Compare commits

...

84 commits

Author SHA1 Message Date
Fedora Release Engineering
30bc22cffe Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-23 19:16:41 +00:00
Gwyn Ciesla
d48a6a0274 Fix FTBFS 2025-02-03 11:35:11 -06:00
Fedora Release Engineering
caa2e140a7 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-16 15:45:00 +00:00
Fedora Release Engineering
e396f8ce41 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-17 20:58:15 +00:00
Michal Domonkos
054a3b9eb7 Fix improperly commented out macros in %prep
Since RPM 4.20, %prep is no longer implemented as a special "hack" [1]
but is now a regular build scriptlet, meaning that %setup or %patch are
now treated as regular macros and thus will be expanded even in comments
(as documented in [2]).

Our spec has these so fix them up to unbreak the build on F41.

[1] https://github.com/rpm-software-management/rpm/issues/2205
[2] https://rpm-software-management.github.io/rpm/manual/spec.html
2024-05-31 15:05:26 +02:00
Fedora Release Engineering
8b585bcf2f Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-24 09:26:16 +00:00
Fedora Release Engineering
7fba8dced8 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-19 17:09:33 +00:00
Gwyn Ciesla
a202e42876 Fix FTBFS 2023-08-24 11:43:07 -05:00
Fedora Release Engineering
0fa1d76227 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-19 17:27:23 +00:00
Gwyn Ciesla
0292476790 migrated to SPDX license 2023-03-07 15:38:18 -06:00
Fedora Release Engineering
e8ece41b1b Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 01:23:49 +00:00
Florian Weimer
44061c3b49 C99 compatibility fixes (#2156074)
Related to:

  <https://fedoraproject.org/wiki/Changes/PortingToModernC>
  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
2022-12-23 18:36:43 +01:00
Fedora Release Engineering
2c7928ccf4 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-21 00:27:34 +00:00
Fedora Release Engineering
fad7e2992f - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 00:39:53 +00:00
Fedora Release Engineering
04074347b3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-21 20:47:11 +00:00
Fedora Release Engineering
f77cb95d5d - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 03:24:19 +00:00
Tom Stellard
849d5cbf11 Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2020-12-17 04:31:53 +00:00
Fedora Release Engineering
ab48481a71 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-27 15:23:31 +00:00
Jeff Law
3a8f67ea00 Disable LTO 2020-07-13 09:50:39 -06:00
Fedora Release Engineering
b43fb6b695 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-28 15:50:43 +00:00
Fedora Release Engineering
6e06a6e767 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-24 21:59:29 +00:00
Fedora Release Engineering
096728f597 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-01-31 17:13:42 +00:00
Gwyn Ciesla
3f44ee2d4d 0.34 2018-09-25 08:21:42 -05:00
Igor Gnatenko
0bc39a612b add BuildRequires: gcc
Reference: https://fedoraproject.org/wiki/Changes/Remove_GCC_from_BuildRoot
2018-07-18 11:23:39 +02:00
Fedora Release Engineering
26e18673c6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-12 22:52:39 +00:00
Jason Tibbitts
0d1a23dd91 Remove needless use of %defattr 2018-07-10 00:38:24 -05:00
Igor Gnatenko
62d80f22b3
Remove %clean section
None of currently supported distributions need that.
Last one was EL5 which is EOL for a while.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-14 07:57:42 +01:00
Igor Gnatenko
9466fb9d01 Remove BuildRoot definition
None of currently supported distributions need that.
It was needed last for EL5 which is EOL now

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-13 23:13:15 +01:00
Igor Gnatenko
88c9dd69d5
Escape macros in %changelog
Reference: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/Y2ZUKK2B7T2IKXPMODNF6HB2O5T5TS6H/
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-09 09:07:43 +01:00
Fedora Release Engineering
3c79ceed2c - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-07 06:50:47 +00:00
Fedora Release Engineering
d73454b1b3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild 2017-08-02 19:35:49 +00:00
Fedora Release Engineering
a8cf0df9e8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-26 06:13:19 +00:00
Richard W.M. Jones
37f0b67b43 Move to much newer upstream version which supports aarch64 and POWER.
- Fix bogus date in changelog.
2017-03-18 13:02:30 -04:00
Fedora Release Engineering
513dd71273 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild 2017-02-10 08:23:38 +00:00
Dan Horák
4938e95ef0 - Enable s390x build 2016-09-15 12:39:24 +02:00
Peter Robinson
abcee70778 Exclude aarch64 Power64 s390x 2016-08-13 00:28:59 +01:00
Jon Ciesla
5a591d76c9 Patch for insecure defpath. 2016-07-25 12:09:34 -05:00
Jon Ciesla
1f59733a51 Spec cleanup. 2016-04-07 11:14:07 -04:00
Dennis Gilmore
2eb5c9ba3a - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild 2016-02-03 18:44:04 +00:00
Dennis Gilmore
2a9f7fbc87 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild 2015-06-17 04:04:31 +00:00
Jon Ciesla
64344f85c6 Fix FTBFS. 2014-11-17 11:52:05 -06:00
Jon Ciesla
25fcdf4c29 Merge branch 'master' of ssh://pkgs.fedoraproject.org/dietlibc 2014-10-06 13:07:30 -05:00
Jon Ciesla
6f331cb433 Pull extra cl macro 2014-10-06 13:07:11 -05:00
Peter Robinson
5c717e2ad7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild 2014-08-16 02:48:02 +00:00
Dennis Gilmore
fd5b87ad1b - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild 2014-06-07 02:23:05 -05:00
Jon Ciesla
50f75fadec Update to latest. 2014-05-05 12:23:11 -05:00
Jon Ciesla
1553e83649 Fix type in files. 2013-09-17 07:39:03 -05:00
Dennis Gilmore
2acfe430ea - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild 2013-08-03 02:12:25 -05:00
Jon Ciesla
c0f10d1aae Spec cleanup. 2013-03-27 16:11:45 -05:00
Dennis Gilmore
2173c64079 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild 2013-02-13 13:42:44 -06:00
Enrico Scholz
48316be399 updated to recent snapshot 2012-08-26 16:24:21 +02:00
Dennis Gilmore
afb79389e9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild 2012-07-18 15:42:16 -05:00
Enrico Scholz
1b41fd7205 reverted removal of kernel headers; causes too much trouble 2012-04-30 12:11:45 +02:00
Enrico Scholz
08122db4c1 bumped release 2012-04-29 14:54:20 +02:00
Enrico Scholz
55acbe41bb make: embedded monotic increasing number into github patch 2012-04-29 14:53:58 +02:00
Enrico Scholz
a9e78e341c added some -Wno-* build flags 2012-04-29 14:53:03 +02:00
Enrico Scholz
ab2b604420 removed shipped linux headers 2012-04-29 14:52:12 +02:00
Enrico Scholz
031e2ffc83 - updated git-patch (fstatat(2) implementation + actime_r(3) fixes)
- removed local runtests-X.sh; it is in git already
2012-04-05 14:52:00 +02:00
Enrico Scholz
022e9e2642 - updated to 20120330 CVS snapshot
- versionized the patchset fetched from github
2012-03-31 16:04:45 +02:00
Enrico Scholz
2ed0748501 makefile: added target to fetch the github patch 2012-03-31 16:01:11 +02:00
Enrico Scholz
752d6199de updated to 20111222 CVS snapshot
removed github patch from scm and upload it to the source cache
2012-01-14 14:52:06 +01:00
Enrico Scholz
edbb4f6111 verinfo: updated url 2012-01-14 14:49:53 +01:00
Enrico Scholz
566f0a438e generate .xz tarballs 2012-01-14 14:47:06 +01:00
Dennis Gilmore
7604e732c2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild 2012-01-12 18:37:41 -06:00
Enrico Scholz
26c9d4c27f create files in mkstemp() with O_LARGEFILE 2011-03-12 22:28:45 +01:00
Enrico Scholz
02f25d8def reduced stack size for testsuite 2011-03-12 21:32:12 +01:00
Enrico Scholz
fd647b68b1 set fixed page size for arm 2011-03-12 21:32:01 +01:00
Enrico Scholz
daabea0b25 disabled linux 2.2/2.4 compatibility code + valgrind nice mode 2011-03-12 21:31:42 +01:00
Enrico Scholz
eb12cf48a8 updated to 20110311 CVS + rediffed patches 2011-03-12 21:31:14 +01:00
Enrico Scholz
d7dfb66cef - other ARM enhancements
- fixed missing headers in last utime(2) + fadvise(2) patches
2011-02-20 20:57:53 +01:00
Enrico Scholz
f2e3c0ca3e - further ARM fixes
- global fixes for utime(2), fadvise*(2)
2011-02-20 16:21:54 +01:00
Dennis Gilmore
7c1ee801ca - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild 2011-02-08 07:49:21 -06:00
Enrico Scholz
6e9794c707 added common alarm(2) implementation 2011-01-14 21:29:01 +01:00
Enrico Scholz
dc82a0df5a updated comment about failing tst-strtod test
whitespace cleanups
2011-01-09 15:16:36 +01:00
Enrico Scholz
b92a8e93a6 - replaced all the single patches with a big one from
https://github.com/ensc/dietlibc/commits/rebase
- various ARM-EABI fixes (667852)
2011-01-09 14:44:03 +01:00
Enrico Scholz
c42d5c8550 updated pagesize patch 2011-01-09 14:39:48 +01:00
Enrico Scholz
6c2f51368e initial checkin 2011-01-09 14:39:22 +01:00
Enrico Scholz
9c6a50d7ce updated to 20101223 CVS snapshot 2010-12-24 13:23:45 +01:00
Enrico Scholz
1c6c4ec53c whitespace cleanup 2010-12-24 13:23:16 +01:00
Enrico Scholz
c24d5e7f4b updated CVS_BASEVER 2010-12-24 13:22:10 +01:00
Enrico Scholz
1db3978d8f rediffed 2010-12-24 13:22:00 +01:00
Enrico Scholz
2425041cc1 readded makefile 2010-08-15 23:53:19 +02:00
Fedora Release Engineering
c7bbe4034a dist-git conversion 2010-07-28 12:58:00 +00:00
ensc
0d68259124 - added -static provides (#609606)
- use %%apply, not %%patch
- updated %%release_func macro
2010-07-09 08:17:59 +00:00
27 changed files with 325 additions and 2763 deletions

View file

@ -1,2 +0,0 @@
dietlibc-0.32.tar.bz2
dietlibc-0.32.tar.bz2.sig

9
.gitignore vendored Normal file
View file

@ -0,0 +1,9 @@
/dietlibc-0.33.20120330.tar.xz
/dietlibc-github-236455eac1d2ed2e2004a89b85f904f3ab27e0da.patch.gz
/dietlibc-0.33.20120825.tar.xz
/dietlibc-github-c3f1cf67fcc186bb859e64a085bf98aaa6182a82.patch.gz
/dietlibc.tar.gz
/dietlibc-0.33.20170317.tar.xz
/dietlibc-0.34.20170317.tar.xz
/dietlibc-0.34.tar.xz
/dietlibc-0.34.tar.xz.sig

View file

@ -1,29 +1,27 @@
# Makefile for source rpm: dietlibc
NAME := dietlibc
SPECFILE = $(firstword $(wildcard *.spec))
MAKEFILE_COMMON = $(HOME)/.fedora/common.mk
-include $(MAKEFILE_COMMON)
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)
CVS_BASEVER = 0.31
CVS ?= cvs
GIT ?= git
TAR ?= tar
GZIP ?= gzip
CVS_BASEVER = 0.34
CVS_DATE := $(shell date +'%Y%m%d' -d '-1 day')
GIT_URL = git://github.com/ensc/dietlibc.git
GIT_DIFF_OPTS = --summary --stat --patch
GIT_BRANCH_OLD = CVS
GIT_BRANCH_NEW = master
_cvs_suffix = ${CVS_BASEVER}.${CVS_DATE}
cvs-sources:
cd ${DESTDIR} . && cvs -d :pserver:cvs@cvs.fefe.de:/cvs -z9 export -D${CVS_DATE} -d dietlibc-${_cvs_suffix} dietlibc
cd ${DESTDIR} . && tar cjf dietlibc-${_cvs_suffix}.tar.bz2 dietlibc-${_cvs_suffix} --owner root --group root
cd ${DESTDIR} . && $(CVS) -d :pserver:cvs@cvs.fefe.de:/cvs -z9 export -D${CVS_DATE} -d dietlibc-${_cvs_suffix} dietlibc
cd ${DESTDIR} . && $(TAR) cJf dietlibc-${_cvs_suffix}.tar.xz dietlibc-${_cvs_suffix} --owner root --group root
git-patch:
cd ${DESTDIR} . && $(GIT) clone --mirror $(GIT_URL) dietlibc.git
cd ${DESTDIR} . && cd dietlibc.git && { \
ref=`git ls-remote . refs/heads/$(GIT_BRANCH_NEW) | cut -f 1` && \
cnt=`git rev-list refs/heads/$(GIT_BRANCH_NEW) | wc -l` && \
$(GIT) diff $(GIT_DIFF_OPTS) $(GIT_BRANCH_OLD)..$(GIT_BRANCH_NEW) > diff && \
$(GZIP) -c < diff > ../dietlibc-g$$cnt+$$ref.patch.gz ; }
cd ${DESTDIR} . && rm -rf dietlibc.git

View file

@ -1,33 +0,0 @@
From fdd7de4dbb4b214b45e1b53100110af4e4895458 Mon Sep 17 00:00:00 2001
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Date: Sat, 19 Apr 2008 17:49:05 +0200
Subject: [PATCH 01/18] Return new nice value for nice(2)
Changed nice(2) to return the new nice value instead of 0/-1.
---
lib/__nice.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/lib/__nice.c b/lib/__nice.c
index d751104..8e205c0 100644
--- a/lib/__nice.c
+++ b/lib/__nice.c
@@ -1,9 +1,13 @@
#include "syscalls.h"
-#include <sys/time.h>
+#include <errno.h>
#include <sys/resource.h>
#ifndef __NR_nice
int nice(int i) {
- return setpriority(PRIO_PROCESS,0,getpriority(PRIO_PROCESS,0)+i);
+ if (setpriority(PRIO_PROCESS,0,getpriority(PRIO_PROCESS,0)+i) == -1) {
+ errno=EPERM;
+ return -1;
+ }
+ return getpriority(PRIO_PROCESS,0);
}
#endif
--
1.6.2.5

View file

@ -1,11 +0,0 @@
--- dietlibc-0.29/diet.c.nostackprotector 2005-05-18 16:38:55.000000000 +0200
+++ dietlibc-0.29/diet.c 2005-10-30 12:27:06.000000000 +0100
@@ -319,6 +319,8 @@
if (strcmp(argv[i],"-fpic") && strcmp(argv[i],"-fno-pic"))
continue;
}
+ if (strcmp(argv[i],"-fstack-protector")==0)
+ continue;
*dest++=argv[i];
}
#ifndef __DYN_LIB

View file

@ -1,32 +0,0 @@
From b855ea26129711c87489ce185def60ea46a77698 Mon Sep 17 00:00:00 2001
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Date: Sat, 19 Apr 2008 17:50:24 +0200
Subject: [PATCH 05/18] Sanity checks for syscall availability
Catch the case when syscall(2) is not implemented for the actual arch
instead of jumping to the next function and executing the wrong code
---
libcompat/syscall.S | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/libcompat/syscall.S b/libcompat/syscall.S
index c9f72bb..4188167 100644
--- a/libcompat/syscall.S
+++ b/libcompat/syscall.S
@@ -130,6 +130,12 @@ syscall:
b __unified_syscall
#else
- /* arch not implemented yet */
+#include <endian.h>
+ .section .comment
+#if (__WORDSIZE == 64)
+ .quad __syscall_2_not_implemented_for_this_arch
+#else
+ .long __syscall_2_not_implemented_for_this_arch
+#endif
#endif
.size syscall, . - syscall
--
1.6.2.5

View file

@ -1,51 +0,0 @@
From 81eaf0eab3a66c6e055dc243fc70b204d33c59a2 Mon Sep 17 00:00:00 2001
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Date: Sat, 19 Apr 2008 17:54:03 +0200
Subject: [PATCH 06/18] Workaround PPC build issues
Fixes https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=182118 and
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27054
---
libm/gamma.c | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/libm/gamma.c b/libm/gamma.c
index 9682f35..370bec6 100644
--- a/libm/gamma.c
+++ b/libm/gamma.c
@@ -33,19 +33,19 @@ Return value gamma returns a value in range (-0.1208, +oo). For a input
#include <stdlib.h>
#include <math.h>
-#define B0 + 1.0l/ 6/ 1/ 2
-#define B1 - 1.0l/ 30/ 3/ 4
-#define B2 + 1.0l/ 42/ 5/ 6
-#define B3 - 1.0l/ 30/ 7/ 8
-#define B4 + 5.0l/ 66/ 9/10
-#define B5 - 691.0l/2730/11/12
-#define B6 + 7.0l/ 6/13/14
-#define B7 - 3617.0l/ 510/15/16
-#define B8 + 43867.0l/ 798/17/18
-#define B9 - 174611.0l/ 330/19/20
-#define B10 + 854513.0l/ 138/21/22
-#define B11 - 236364091.0l/2730/23/24
-#define B12 + 8553103.0l/ 6/25/26
+#define B0 + 1.0/ 6/ 1/ 2
+#define B1 - 1.0/ 30/ 3/ 4
+#define B2 + 1.0/ 42/ 5/ 6
+#define B3 - 1.0/ 30/ 7/ 8
+#define B4 + 5.0/ 66/ 9/10
+#define B5 - 691.0/2730/11/12
+#define B6 + 7.0/ 6/13/14
+#define B7 - 3617.0/ 510/15/16
+#define B8 + 43867.0/ 798/17/18
+#define B9 - 174611.0/ 330/19/20
+#define B10 + 854513.0/ 138/21/22
+#define B11 - 236364091.0/2730/23/24
+#define B12 + 8553103.0/ 6/25/26
static const double coeff[] = { B0, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10 };
int signgam;
--
1.6.2.5

View file

@ -1,26 +0,0 @@
From 6aecc55de013adb4cf83be57a85092a96034731c Mon Sep 17 00:00:00 2001
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Date: Sat, 19 Apr 2008 18:00:19 +0200
Subject: [PATCH 07/18] Security fix for proper $PATH
Removed '.' from the default $PATH.
---
include/paths.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/paths.h b/include/paths.h
index 553b4fa..9bf216f 100644
--- a/include/paths.h
+++ b/include/paths.h
@@ -2,7 +2,7 @@
#define _PATHS_H
#define _PATH_BSHELL "/bin/sh"
-#define _PATH_DEFPATH "/bin:/usr/bin:"
+#define _PATH_DEFPATH "/bin:/usr/bin"
#define _PATH_DEVNULL "/dev/null"
--
1.6.2.5

View file

@ -1,50 +0,0 @@
From 1a0c2661fa8f3ad43c7d38915c967ad6aac987f9 Mon Sep 17 00:00:00 2001
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Date: Sat, 19 Apr 2008 17:43:08 +0200
Subject: [PATCH 14/18] Fixes for -Werror-no-implicit-functions
Some fixes for issues preventing builds with
'-Werror-implicit-function-declaration'.
---
test/getservbyname.c | 1 +
test/stdlib/testsort.c | 2 ++
test/stdlib/tst-calloc.c | 2 ++
3 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/test/getservbyname.c b/test/getservbyname.c
index b70ca19..caf1c9f 100644
--- a/test/getservbyname.c
+++ b/test/getservbyname.c
@@ -1,5 +1,6 @@
#include <stdio.h>
#include <netdb.h>
+#include <arpa/inet.h>
int main(int argc,char *argv[]) {
struct servent* se;
diff --git a/test/stdlib/testsort.c b/test/stdlib/testsort.c
index aa4332a..5a92bc0 100644
--- a/test/stdlib/testsort.c
+++ b/test/stdlib/testsort.c
@@ -1,3 +1,5 @@
+#define _BSD_SOURCE
+
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
diff --git a/test/stdlib/tst-calloc.c b/test/stdlib/tst-calloc.c
index a9b9e2a..049117b 100644
--- a/test/stdlib/tst-calloc.c
+++ b/test/stdlib/tst-calloc.c
@@ -17,6 +17,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#define _BSD_SOURCE
+
#include <errno.h>
#include <limits.h>
#include <malloc.h>
--
1.6.2.5

View file

@ -1,46 +0,0 @@
From 93df169bb52d83027d77f17c30212a1b109cfc9d Mon Sep 17 00:00:00 2001
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Date: Sat, 19 Apr 2008 17:42:20 +0200
Subject: [PATCH 13/18] Fixes/enhancements in str?time() functions
This patch changes the used format for %x and %X specifiers in
strptime(3) to match these specified by SUSv2. It adds support
for '%F' in strftime(3) too.
---
libugly/strftime.c | 1 +
libugly/strptime.c | 5 +++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/libugly/strftime.c b/libugly/strftime.c
index 56ae082..cf16f37 100644
--- a/libugly/strftime.c
+++ b/libugly/strftime.c
@@ -55,6 +55,7 @@ again:
case 'x': src = "%b %a %d"; goto _strf;
case 'X': src = "%k:%M:%S"; goto _strf;
case 'D': src = "%m/%d/%y"; goto _strf;
+ case 'F': src = "%Y-%m-%d"; goto _strf;
case 'T': src = "%H:%M:%S";
_strf: p += strftime (p, (size_t)(dst+max-p), src, tm); break;
case 'a': src = sweekdays [tm->tm_wday]; goto _str;
diff --git a/libugly/strptime.c b/libugly/strptime.c
index 9d7f530..d19f309 100644
--- a/libugly/strptime.c
+++ b/libugly/strptime.c
@@ -119,10 +119,11 @@ char* strptime(const char* s,const char* format, struct tm* tm) {
++s;
break;
case 'x':
- s=strptime(s,"%b %a %d",tm);
+ /* see SUSv2, Ch.7 "LC_TIME Category in the POSIX Locale" */
+ s=strptime(s,"%m/%d/%y",tm);
break;
case 'X':
- s=strptime(s,"%k:%M:%S",tm);
+ s=strptime(s,"%H:%M:%S",tm);
break;
case 'y':
i=getint(&s,2);
--
1.6.2.5

View file

@ -1,34 +0,0 @@
From f49499c7c3a6791249588ab4863d6e9eb1ba1010 Mon Sep 17 00:00:00 2001
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Date: Sat, 28 Feb 2009 13:32:45 +0100
Subject: [PATCH 04/18] Build some files without stack-protector
---
Makefile | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
index dc23d1a..ec97fe9 100644
--- a/Makefile
+++ b/Makefile
@@ -129,6 +129,8 @@ LIBPTHREAD_OBJS=$(patsubst libpthread/%.c,$(OBJDIR)/%.o,$(shell ./threadsafe.sh)
LIBGMON_OBJS=$(OBJDIR)/__mcount.o $(OBJDIR)/monitor.o $(OBJDIR)/profil.o
+NO_STACK_PROTECTOR=stackgap.o __get_elf_aux_value.o
+
include $(ARCH)/Makefile.add
LIBMATHOBJ=$(patsubst %,$(OBJDIR)/%,$(LIBMATH))
@@ -177,6 +179,8 @@ $(OBJDIR)/pthread_%.o: libpthread/pthread_%.c $(OBJDIR)/.dirstamp
$(OBJDIR)/%.o: %.c $(OBJDIR)/.dirstamp
$(CROSS)$(CC) $(INC) $(CFLAGS) -c $< -o $@ -D__dietlibc__
$(COMMENT) -$(STRIP) -x -R .comment -R .note $@
+
+$(addprefix $(OBJDIR)/,$(NO_STACK_PROTECTOR)): XCFLAGS+=-fno-stack-protector
endif
ifeq ($(shell $(CC) -v 2>&1 | grep "gcc version"),gcc version 4.0.0)
--
1.6.2.5

View file

@ -1,31 +0,0 @@
From a4e9c68f8d10d81bca7b285c100405492b7687da Mon Sep 17 00:00:00 2001
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Date: Sat, 19 Apr 2008 17:43:42 +0200
Subject: [PATCH 15/18] __noreturn__ annotation for abort(3)
SUSv2 says about abort(3):
The abort() function shall not return.
Hence, an '__attribute__((__noreturn__))' should be added to the
abort(3) declaration.
---
include/stdlib.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/stdlib.h b/include/stdlib.h
index 34f3a7f..0cea604 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -47,7 +47,7 @@ double atof(const char *nptr) __THROW;
__extension__ long long int atoll(const char *nptr);
void exit(int status) __THROW __attribute__((__noreturn__));
-void abort(void) __THROW;
+void abort(void) __THROW __attribute__((__noreturn__));
extern int rand(void) __THROW;
extern int rand_r(unsigned int *seed) __THROW;
--
1.6.2.5

File diff suppressed because it is too large Load diff

View file

@ -1,275 +0,0 @@
From d10d2f6fca4e391fa863d771dd8c5f7c01d7dfa4 Mon Sep 17 00:00:00 2001
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Date: Sat, 19 Apr 2008 17:39:23 +0200
Subject: [PATCH 12/18] Fixes/enhancements for INF/NAN handling in printf()
This patch adds support for uppercase 'F' and 'G' printf format
specifiers. It fixes handling of -INF values in __dtostr() too;
previously, there was
| unsigned int i;
| if ((i=isinf(d))) return copystring(buf,maxlen,i>0?"inf":"-inf");
~~~
which evaluated to true everytime. The copystring() function
worked for 3-letter words only but not for '-inf'.
The last argument of __dtostr() was changed from a boolean flag to
a bitmask. Bit 0 encodes 'g' or 'f', and bit 1 lower-/uppercase.
There should be probably added some macros for them; for now,
these values are used directly.
Please note that this might affect other applications (liblowfat?)
too which are using __dtostr().
'isinf(3)' is a builtin with gcc 4.3 and does not give a hint
about the signess of the infinity anymore. Hence, this patch uses
a more portable way where needed.
---
include/stdlib.h | 6 ++++-
lib/__dtostr.c | 18 +++++++++++-----
lib/__v_printf.c | 59 +++++++++++++++++++++++++++++------------------------
test/printf.c | 44 +++++++++++++++++++++++++++++++++++----
4 files changed, 88 insertions(+), 39 deletions(-)
diff --git a/include/stdlib.h b/include/stdlib.h
index d1e1569..34f3a7f 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -28,8 +28,12 @@ long double strtold(const char *nptr, char **endptr) __THROW;
long int strtol(const char *nptr, char **endptr, int base) __THROW;
unsigned long int strtoul(const char *nptr, char **endptr, int base) __THROW;
+/* HACK: used flags in __dtostr
+ 0x01 ... 'g'
+ 0x02 ... uppercase
+ Define some constants somewhere... */
extern int __ltostr(char *s, unsigned int size, unsigned long i, unsigned int base, int UpCase) __THROW;
-extern int __dtostr(double d,char *buf,unsigned int maxlen,unsigned int prec,unsigned int prec2,int g) __THROW;
+extern int __dtostr(double d,char *buf,unsigned int maxlen,unsigned int prec,unsigned int prec2,int flags) __THROW;
#if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L
__extension__ long long int strtoll(const char *nptr, char **endptr, int base) __THROW;
diff --git a/lib/__dtostr.c b/lib/__dtostr.c
index 1d082e3..bc61200 100644
--- a/lib/__dtostr.c
+++ b/lib/__dtostr.c
@@ -5,13 +5,15 @@
static int copystring(char* buf,int maxlen, const char* s) {
int i;
- for (i=0; i<3&&i<maxlen; ++i)
+ for (i=0; i<maxlen; ++i) {
buf[i]=s[i];
- if (i<maxlen) { buf[i]=0; ++i; }
+ if (!s[i])
+ break;
+ }
return i;
}
-int __dtostr(double d,char *buf,unsigned int maxlen,unsigned int prec,unsigned int prec2,int g) {
+int __dtostr(double d,char *buf,unsigned int maxlen,unsigned int prec,unsigned int prec2,int flags) {
#if 1
union {
unsigned long long l;
@@ -35,8 +37,12 @@ int __dtostr(double d,char *buf,unsigned int maxlen,unsigned int prec,unsigned i
double tmp;
char *oldbuf=buf;
- if ((i=isinf(d))) return copystring(buf,maxlen,i>0?"inf":"-inf");
- if (isnan(d)) return copystring(buf,maxlen,"nan");
+ if (isinf(d))
+ return copystring(buf,maxlen,
+ (d<0)?
+ (flags&0x02?"-INF":"-inf"):
+ (flags&0x02?"INF":"inf"));
+ if (isnan(d)) return copystring(buf,maxlen,flags&0x02?"NAN":"nan");
e10=1+(long)(e*0.30102999566398119802); /* log10(2) */
/* Wir iterieren von Links bis wir bei 0 sind oder maxlen erreicht
* ist. Wenn maxlen erreicht ist, machen wir das nochmal in
@@ -126,7 +132,7 @@ int __dtostr(double d,char *buf,unsigned int maxlen,unsigned int prec,unsigned i
if (prec2 || prec>(unsigned int)(buf-oldbuf)+1) { /* more digits wanted */
if (!maxlen) return 0; --maxlen;
*buf='.'; ++buf;
- if (g) {
+ if ((flags & 0x01)) {
if (prec2) prec=prec2;
prec-=buf-oldbuf-1;
} else {
diff --git a/lib/__v_printf.c b/lib/__v_printf.c
index 36202f5..964c005 100644
--- a/lib/__v_printf.c
+++ b/lib/__v_printf.c
@@ -4,6 +4,7 @@
#include <stdlib.h>
#include <string.h>
#include <errno.h>
+#include <math.h>
#include "dietstdio.h"
#include "dietwarning.h"
@@ -346,45 +347,49 @@ num_printf:
#ifdef WANT_FLOATING_POINT_IN_PRINTF
/* print a floating point value */
case 'f':
+ case 'F':
case 'g':
+ case 'G':
{
- int g=(ch=='g');
+ int flags=(((ch&0x5f)=='G') ? 0x01 : 0x00) | ((ch&0x20) ? 0x00 : 0x02);
double d=va_arg(arg_ptr,double);
s=buf+1;
if (width==0) width=1;
if (!flag_dot) preci=6;
if (flag_sign || d < +0.0) flag_in_sign=1;
- sz=__dtostr(d,s,sizeof(buf)-1,width,preci,g);
-
- if (flag_dot) {
- char *tmp;
- if ((tmp=strchr(s,'.'))) {
- if (preci || flag_hash) ++tmp;
- while (preci>0 && *++tmp) --preci;
- *tmp=0;
- } else if (flag_hash) {
- s[sz]='.';
- s[++sz]='\0';
+ sz=__dtostr(d,s,sizeof(buf)-1,width,preci,flags);
+
+ if (!isnan(d) && !isinf(d)) { /* skip NaN + INF values */
+ if (flag_dot) {
+ char *tmp;
+ if ((tmp=strchr(s,'.'))) {
+ if (preci || flag_hash) ++tmp;
+ while (preci>0 && *++tmp) --preci;
+ *tmp=0;
+ } else if (flag_hash) {
+ s[sz]='.';
+ s[++sz]='\0';
+ }
}
- }
- if (g) {
- char *tmp,*tmp1; /* boy, is _this_ ugly! */
- if ((tmp=strchr(s,'.'))) {
- tmp1=strchr(tmp,'e');
- while (*tmp) ++tmp;
- if (tmp1) tmp=tmp1;
- while (*--tmp=='0') ;
- if (*tmp!='.') ++tmp;
- *tmp=0;
- if (tmp1) strcpy(tmp,tmp1);
+ if ((flags&0x01)) {
+ char *tmp,*tmp1; /* boy, is _this_ ugly! */
+ if ((tmp=strchr(s,'.'))) {
+ tmp1=strchr(tmp,'e');
+ while (*tmp) ++tmp;
+ if (tmp1) tmp=tmp1;
+ while (*--tmp=='0') ;
+ if (*tmp!='.') ++tmp;
+ *tmp=0;
+ if (tmp1) strcpy(tmp,tmp1);
+ }
}
- }
- if ((flag_sign || flag_space) && d>=0) {
- *(--s)=(flag_sign)?'+':' ';
- ++sz;
+ if ((flag_sign || flag_space) && d>=0) {
+ *(--s)=(flag_sign)?'+':' ';
+ ++sz;
+ }
}
sz=strlen(s);
diff --git a/test/printf.c b/test/printf.c
index 719461a..ef6050d 100644
--- a/test/printf.c
+++ b/test/printf.c
@@ -2,11 +2,26 @@
#include <string.h>
#include <stdlib.h>
#include <assert.h>
+#include <math.h>
+#include <float.h>
#include <sys/param.h>
#include <locale.h>
#define ALGN 5
+#ifndef INFINITY
+# if (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3))
+# define INFINITY (__builtin_inf())
+# endif
+#endif
+
+#ifndef NAN
+# if (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3))
+# define NAN (__builtin_nan(""))
+# endif
+#endif
+
+
// https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=112986
#if 0
#undef assert
@@ -60,7 +75,7 @@
TEST_SNPRINTF(EXP, 0, __VA_ARGS__); \
TEST_SNPRINTF(EXP, sizeof(EXP)+ALGN, __VA_ARGS__); \
TEST_SNPRINTF_NULL(EXP, __VA_ARGS__)
-
+
int main()
{
@@ -101,7 +116,7 @@ int main()
TEST("42.23", "%5.2f", 42.23);
TEST("42.23", "%5.4g", 42.23);
TEST(" 42.2", "%5.3g", 42.23);
-
+
TEST(" 1", "%*i", 4, 1);
TEST(" 1", "%4i", 1);
TEST("1 ", "%-4i", 1);
@@ -131,13 +146,32 @@ int main()
TEST("-01234", "%6.5i", -1234);
TEST(" 1234", "%6.5s", "1234");
+#ifdef INFINITY
+ TEST("inf", "%f", INFINITY);
+ TEST("-inf", "%f", -INFINITY);
+ TEST("INF", "%F", INFINITY);
+ TEST("-INF", "%F", -INFINITY);
+
+ TEST("inf", "%g", INFINITY);
+ TEST("-inf", "%g", -INFINITY);
+ TEST("INF", "%G", INFINITY);
+ TEST("-INF", "%G", -INFINITY);
+#endif
+
+#ifdef NAN
+ TEST("nan", "%f", NAN);
+ TEST("NAN", "%F", NAN);
+ TEST("nan", "%g", NAN);
+ TEST("NAN", "%G", NAN);
+#endif
+
#ifdef XSI_TESTS
setlocale(LC_ALL, "de_DE");
-
+
TEST("1.234", "%'u", 1234);
TEST("2 1", "%2$u %1$u", 1, 2);
#endif
-
-
+
+
return EXIT_SUCCESS;
}
--
1.6.2.5

View file

@ -1,148 +0,0 @@
From c1354c051ff98683508272385834d35198253542 Mon Sep 17 00:00:00 2001
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Date: Sat, 25 Jul 2009 13:54:39 +0200
Subject: [PATCH 02/18] Fixed SMP build
'make -j' fails usually because $(OBJDIR) was not created yet when
compiling files.
This patch adds a $(OBJDIR)/.dirstamp target which is added as a
dependency for object files and executes an 'mkdir'.
Ditto for $(PICODIR)
---
Makefile | 42 +++++++++++++++++++++---------------------
1 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/Makefile b/Makefile
index adc2779..8009cb4 100644
--- a/Makefile
+++ b/Makefile
@@ -88,7 +88,7 @@ ILIBDIR=$(LIBDIR)-$(ARCH)
HOME=$(shell pwd)
-WHAT= $(OBJDIR) $(OBJDIR)/start.o $(OBJDIR)/dyn_start.o $(OBJDIR)/dyn_stop.o \
+WHAT= $(OBJDIR)/start.o $(OBJDIR)/dyn_start.o $(OBJDIR)/dyn_stop.o \
$(OBJDIR)/dietlibc.a $(OBJDIR)/liblatin1.a \
$(OBJDIR)/libcompat.a $(OBJDIR)/libm.a \
$(OBJDIR)/librpc.a $(OBJDIR)/libpthread.a \
@@ -150,30 +150,30 @@ PWD=$(shell pwd)
# added real dynamic dietlibc.so
PICODIR = pic-$(ARCH)
-$(OBJDIR) $(PICODIR):
- mkdir $@
-
% :: %,v
+%/.dirstamp:
+ mkdir $*
+ @touch $@
ifeq ($(CC),tcc)
-$(OBJDIR)/%.o: %.S $(ARCH)/syscalls.h
+$(OBJDIR)/%.o: %.S $(ARCH)/syscalls.h $(OBJDIR)/.dirstamp
$(CROSS)cpp $(INC) $< | $(CROSS)as -o $@
-$(OBJDIR)/%.o: %.c
+$(OBJDIR)/%.o: %.c $(OBJDIR)/.dirstamp
tcc -I. -Iinclude -c $< -o $@
$(COMMENT) -$(CROSS)strip -x -R .comment -R .note $@
else
-$(OBJDIR)/pstart.o: start.S
+$(OBJDIR)/pstart.o: start.S $(OBJDIR)/.dirstamp
$(CROSS)$(CC) $(INC) $(CFLAGS) -DPROFILING -c $< -o $@
-$(OBJDIR)/%.o: %.S $(ARCH)/syscalls.h
+$(OBJDIR)/%.o: %.S $(ARCH)/syscalls.h $(OBJDIR)/.dirstamp
$(CROSS)$(CC) $(INC) $(CFLAGS) -c $< -o $@
-$(OBJDIR)/pthread_%.o: libpthread/pthread_%.c
+$(OBJDIR)/pthread_%.o: libpthread/pthread_%.c $(OBJDIR)/.dirstamp
$(CROSS)$(CC) $(INC) $(CFLAGS) -c $< -o $@
$(COMMENT) -$(CROSS)strip -x -R .comment -R .note $@
-$(OBJDIR)/%.o: %.c
+$(OBJDIR)/%.o: %.c $(OBJDIR)/.dirstamp
$(CROSS)$(CC) $(INC) $(CFLAGS) -c $< -o $@ -D__dietlibc__
$(COMMENT) -$(CROSS)strip -x -R .comment -R .note $@
endif
@@ -188,7 +188,7 @@ endif
CC+=-D__dietlibc__
-$(OBJDIR)/crypt.o: libcrypt/crypt.c
+$(OBJDIR)/crypt.o: libcrypt/crypt.c $(OBJDIR)/.dirstamp
$(CROSS)$(CC) $(INC) $(SAFER_CFLAGS) -c $< -o $@
DIETLIBC_OBJ = $(OBJDIR)/unified.o \
@@ -203,7 +203,7 @@ $(OBJDIR)/dietlibc.a: $(DIETLIBC_OBJ) $(OBJDIR)/start.o
$(OBJDIR)/librpc.a: $(LIBRPCOBJ)
$(CROSS)ar cru $@ $(LIBRPCOBJ)
-$(OBJDIR)/libcrypt.a:
+$(OBJDIR)/libcrypt.a: $(OBJDIR)/.dirstamp
touch dummy.c
$(CROSS)$(CC) -c dummy.c
$(CROSS)ar cru $@ dummy.o
@@ -235,26 +235,26 @@ dyn: dyn_lib
$(OBJDIR)/libdl.a: $(LIBDLOBJ)
$(CROSS)ar cru $@ $(LIBDLOBJ)
-dyn_lib: $(PICODIR) $(PICODIR)/libc.so $(PICODIR)/dstart.o \
+dyn_lib: $(PICODIR)/libc.so $(PICODIR)/dstart.o \
$(PICODIR)/dyn_so_start.o $(PICODIR)/dyn_start.o $(PICODIR)/dyn_stop.o \
$(PICODIR)/libpthread.so $(PICODIR)/libdl.so $(PICODIR)/libcompat.so \
$(PICODIR)/libm.so $(PICODIR)/diet-dyn $(PICODIR)/diet-dyn-i
-$(PICODIR)/%.o: %.S $(ARCH)/syscalls.h
+$(PICODIR)/%.o: %.S $(ARCH)/syscalls.h $(PICODIR)/.dirstamp
$(CROSS)$(CC) $(INC) $(CFLAGS) -fPIC -D__DYN_LIB -c $< -o $@
-$(PICODIR)/pthread_%.o: libpthread/pthread_%.c
+$(PICODIR)/pthread_%.o: libpthread/pthread_%.c $(PICODIR)/.dirstamp
$(CROSS)$(CC) $(INC) $(CFLAGS) -fPIC -D__DYN_LIB -c $< -o $@
$(COMMENT) $(CROSS)strip -x -R .comment -R .note $@
-$(PICODIR)/%.o: %.c
+$(PICODIR)/%.o: %.c $(PICODIR)/.dirstamp
$(CROSS)$(CC) $(INC) $(CFLAGS) -fPIC -D__DYN_LIB -c $< -o $@
$(COMMENT) $(CROSS)strip -x -R .comment -R .note $@
-$(PICODIR)/dstart.o: start.S
+$(PICODIR)/dstart.o: start.S $(PICODIR)/.dirstamp
$(CROSS)$(CC) $(INC) $(CFLAGS) -fPIC -D__DYN_LIB -c $< -o $@
-$(PICODIR)/dyn_so_start.o: dyn_start.c
+$(PICODIR)/dyn_so_start.o: dyn_start.c $(PICODIR)/.dirstamp
$(CROSS)$(CC) $(INC) $(CFLAGS) -fPIC -D__DYN_LIB -D__DYN_LIB_SHARED -c $< -o $@
$(COMMENT) $(CROSS)strip -x -R .comment -R .note $@
@@ -272,13 +272,13 @@ DYN_LIBCOMPAT_OBJS = $(patsubst $(OBJDIR)/%.o,$(PICODIR)/%.o,$(LIBCOMPATOBJ))
DYN_LIBMATH_OBJS = $(patsubst $(OBJDIR)/%.o,$(PICODIR)/%.o,$(LIBMATHOBJ))
-$(PICODIR)/libc.so: $(PICODIR) $(DYN_LIBC_OBJ)
+$(PICODIR)/libc.so: $(DYN_LIBC_OBJ)
$(LD_UNSET) $(CROSS)$(CC) -nostdlib -shared -o $@ $(CFLAGS) -fPIC $(DYN_LIBC_OBJ) -lgcc -Wl,-soname=libc.so
$(PICODIR)/libpthread.so: $(DYN_PTHREAD_OBJS) dietfeatures.h
$(LD_UNSET) $(CROSS)$(CC) -nostdlib -shared -o $@ $(CFLAGS) -fPIC $(DYN_PTHREAD_OBJS) -L$(PICODIR) -lc -Wl,-soname=libpthread.so
-$(PICODIR)/libdl.so: libdl/_dl_main.c dietfeatures.h
+$(PICODIR)/libdl.so: libdl/_dl_main.c dietfeatures.h $(PICODIR)/.dirstamp
$(LD_UNSET) $(CROSS)$(CC) -D__OD_CLEAN_ROOM -DNODIETREF -fPIC -nostdlib -shared -Bsymbolic -Wl,-Bsymbolic \
-o $@ $(SAFE_CFLAGS) $(INC) libdl/_dl_main.c -Wl,-soname=libdl.so
@@ -330,7 +330,7 @@ $(OBJDIR)/load:
chmod 755 $@
clean:
- rm -f *.o *.a t t1 compile load elftrunc exports mapfile libdietc.so
+ rm -f *.o *.a t t1 compile load elftrunc exports mapfile libdietc.so .dirstamp
rm -rf bin-* pic-*
$(MAKE) -C examples clean
$(MAKE) -C dynlinker clean
--
1.6.2.5

View file

@ -1,39 +0,0 @@
From b993cb8bebea6870771bb66eae8b6d41f9e6e9e6 Mon Sep 17 00:00:00 2001
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Date: Sat, 25 Jul 2009 15:34:44 +0200
Subject: [PATCH 17/18] minor cleanups in stackgap.c
---
lib/stackgap.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/stackgap.c b/lib/stackgap.c
index 5d51c5d..f30b58a 100644
--- a/lib/stackgap.c
+++ b/lib/stackgap.c
@@ -26,9 +26,9 @@ void* __tdataptr;
static void findtlsdata(long* auxvec) {
#if (__WORDSIZE == 64)
- Elf64_Phdr* x=0;
+ Elf64_Phdr const * x=0;
#else
- Elf32_Phdr* x=0;
+ Elf32_Phdr const * x=0;
#endif
size_t i,n;
#ifndef WANT_ELFINFO
@@ -125,9 +125,9 @@ int stackgap(int argc,char* argv[],char* envp[]) {
#endif
#ifdef WANT_STACKGAP
unsigned short s;
+ volatile char* gap;
#endif
#if defined(WANT_STACKGAP) || defined(WANT_SSP)
- volatile char* gap;
#ifndef WANT_ELFINFO
rand=find_rand(auxvec);
#else
--
1.6.2.5

View file

@ -1,26 +0,0 @@
From 729c8524b8a5f3a4bf4ebda7ae23c0a10ef62560 Mon Sep 17 00:00:00 2001
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Date: Sat, 19 Apr 2008 17:57:09 +0200
Subject: [PATCH 09/18] __stack_chk_fail_local function
Added __stack_chk_fail_local() function as an alias for __stack_chk_fail().
This is required for dynamic linking.
---
lib/stack_smash_handler2.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/lib/stack_smash_handler2.c b/lib/stack_smash_handler2.c
index ecefeb8..b03c0d5 100644
--- a/lib/stack_smash_handler2.c
+++ b/lib/stack_smash_handler2.c
@@ -2,6 +2,7 @@
#include <write12.h>
void __stack_chk_fail(void);
+void __stack_chk_fail_local(void) __attribute__((__alias__("__stack_chk_fail")));
/* earlier versions of ProPolice actually gave the address and function
* name as arguments to the handler, so it could print some useful
--
1.6.2.5

View file

@ -1,54 +0,0 @@
From 6838387d66f76e8acb227102d46549a26e7b217c Mon Sep 17 00:00:00 2001
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Date: Sat, 19 Apr 2008 17:56:07 +0200
Subject: [PATCH 08/18] Enhanced __stack_chk_fail
* modified __stack_chk_fail() to trigger a segfault by accessing
address 0x0. Every system with an MMU known by me, segfaults
by dereferencing a NULL pointer.
* added hack to compile stack_smash_handler2 with
'--fno-omit-frame-pointer'.
---
Makefile | 3 ++-
lib/stack_smash_handler2.c | 10 +++++++++-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index ec97fe9..9ea5078 100644
--- a/Makefile
+++ b/Makefile
@@ -175,9 +175,10 @@ $(OBJDIR)/%.o: %.S $(ARCH)/syscalls.h $(OBJDIR)/.dirstamp
$(OBJDIR)/pthread_%.o: libpthread/pthread_%.c $(OBJDIR)/.dirstamp
$(CROSS)$(CC) $(INC) $(CFLAGS) -c $< -o $@
$(COMMENT) -$(STRIP) -x -R .comment -R .note $@
+$(OBJDIR)/stack_smash_handler2.o: XCFLAGS:=-fno-omit-frame-pointer
$(OBJDIR)/%.o: %.c $(OBJDIR)/.dirstamp
- $(CROSS)$(CC) $(INC) $(CFLAGS) -c $< -o $@ -D__dietlibc__
+ $(CROSS)$(CC) $(INC) $(CFLAGS) $(XCFLAGS) -c $< -o $@ -D__dietlibc__
$(COMMENT) -$(STRIP) -x -R .comment -R .note $@
$(addprefix $(OBJDIR)/,$(NO_STACK_PROTECTOR)): XCFLAGS+=-fno-stack-protector
diff --git a/lib/stack_smash_handler2.c b/lib/stack_smash_handler2.c
index 9e85099..ecefeb8 100644
--- a/lib/stack_smash_handler2.c
+++ b/lib/stack_smash_handler2.c
@@ -8,5 +8,13 @@ void __stack_chk_fail(void);
* diagnostics. No more. :-( */
void __stack_chk_fail(void) {
__write2("smashed stack detected, program terminated.\n");
- _exit(127);
+
+ /* trigger a segfault which can be inspected within a debugger (inclusive
+ * stack-trace). 'abort(3)' at this place would be too heavy weighted.
+ *
+ * TODO: limit this to systems which are known to have an MMU (resp. is
+ * dietlibc with stack-protector used on systems without an MMU?)
+ */
+ while (1)
+ *(char *)0 = 0;
}
--
1.6.2.5

View file

@ -1,95 +0,0 @@
From 87682b6ad631272dfdc45e1c760331d803851c06 Mon Sep 17 00:00:00 2001
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Date: Sat, 25 Jul 2009 15:12:43 +0200
Subject: [PATCH 03/18] Define and use $(STRIP) makefile variable
This increases readability and makes it easier to turn off stripping
of debug symbols.
---
Makefile | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/Makefile b/Makefile
index 8009cb4..dc23d1a 100644
--- a/Makefile
+++ b/Makefile
@@ -105,6 +105,7 @@ CROSS=
CC=gcc
INC=-I. -isystem include
+STRIP=$(CROSS)strip
VPATH=lib:libstdio:libugly:libcruft:libcrypt:libshell:liblatin1:libcompat:libdl:librpc:libregex:libm:profiling
@@ -161,7 +162,7 @@ $(OBJDIR)/%.o: %.S $(ARCH)/syscalls.h $(OBJDIR)/.dirstamp
$(OBJDIR)/%.o: %.c $(OBJDIR)/.dirstamp
tcc -I. -Iinclude -c $< -o $@
- $(COMMENT) -$(CROSS)strip -x -R .comment -R .note $@
+ $(COMMENT) -$(STRIP) -x -R .comment -R .note $@
else
$(OBJDIR)/pstart.o: start.S $(OBJDIR)/.dirstamp
$(CROSS)$(CC) $(INC) $(CFLAGS) -DPROFILING -c $< -o $@
@@ -171,11 +172,11 @@ $(OBJDIR)/%.o: %.S $(ARCH)/syscalls.h $(OBJDIR)/.dirstamp
$(OBJDIR)/pthread_%.o: libpthread/pthread_%.c $(OBJDIR)/.dirstamp
$(CROSS)$(CC) $(INC) $(CFLAGS) -c $< -o $@
- $(COMMENT) -$(CROSS)strip -x -R .comment -R .note $@
+ $(COMMENT) -$(STRIP) -x -R .comment -R .note $@
$(OBJDIR)/%.o: %.c $(OBJDIR)/.dirstamp
$(CROSS)$(CC) $(INC) $(CFLAGS) -c $< -o $@ -D__dietlibc__
- $(COMMENT) -$(CROSS)strip -x -R .comment -R .note $@
+ $(COMMENT) -$(STRIP) -x -R .comment -R .note $@
endif
ifeq ($(shell $(CC) -v 2>&1 | grep "gcc version"),gcc version 4.0.0)
@@ -245,18 +246,18 @@ $(PICODIR)/%.o: %.S $(ARCH)/syscalls.h $(PICODIR)/.dirstamp
$(PICODIR)/pthread_%.o: libpthread/pthread_%.c $(PICODIR)/.dirstamp
$(CROSS)$(CC) $(INC) $(CFLAGS) -fPIC -D__DYN_LIB -c $< -o $@
- $(COMMENT) $(CROSS)strip -x -R .comment -R .note $@
+ $(COMMENT) $(STRIP) -x -R .comment -R .note $@
$(PICODIR)/%.o: %.c $(PICODIR)/.dirstamp
$(CROSS)$(CC) $(INC) $(CFLAGS) -fPIC -D__DYN_LIB -c $< -o $@
- $(COMMENT) $(CROSS)strip -x -R .comment -R .note $@
+ $(COMMENT) $(STRIP) -x -R .comment -R .note $@
$(PICODIR)/dstart.o: start.S $(PICODIR)/.dirstamp
$(CROSS)$(CC) $(INC) $(CFLAGS) -fPIC -D__DYN_LIB -c $< -o $@
$(PICODIR)/dyn_so_start.o: dyn_start.c $(PICODIR)/.dirstamp
$(CROSS)$(CC) $(INC) $(CFLAGS) -fPIC -D__DYN_LIB -D__DYN_LIB_SHARED -c $< -o $@
- $(COMMENT) $(CROSS)strip -x -R .comment -R .note $@
+ $(COMMENT) $(STRIP) -x -R .comment -R .note $@
DYN_LIBC_PIC = $(LIBOBJ) $(LIBSTDIOOBJ) $(LIBUGLYOBJ) \
$(LIBCRUFTOBJ) $(LIBCRYPTOBJ) $(LIBSHELLOBJ) $(LIBREGEXOBJ)
@@ -305,19 +306,19 @@ CURNAME=$(notdir $(shell pwd))
$(OBJDIR)/diet: $(OBJDIR)/start.o $(OBJDIR)/dyn_start.o diet.c $(OBJDIR)/dietlibc.a $(OBJDIR)/dyn_stop.o
$(CROSS)$(CC) -isystem include $(CFLAGS) -nostdlib -o $@ $^ -DDIETHOME=\"$(HOME)\" -DVERSION=\"$(VERSION)\" -lgcc
- $(CROSS)strip -R .comment -R .note $@
+ $(STRIP) -R .comment -R .note $@
$(OBJDIR)/diet-i: $(OBJDIR)/start.o $(OBJDIR)/dyn_start.o diet.c $(OBJDIR)/dietlibc.a $(OBJDIR)/dyn_stop.o
$(CROSS)$(CC) -isystem include $(CFLAGS) -nostdlib -o $@ $^ -DDIETHOME=\"$(prefix)\" -DVERSION=\"$(VERSION)\" -DINSTALLVERSION -lgcc
- $(CROSS)strip -R .comment -R .note $@
+ $(STRIP) -R .comment -R .note $@
$(PICODIR)/diet-dyn: $(PICODIR)/start.o $(PICODIR)/dyn_start.o diet.c
$(LD_UNSET) $(CROSS)$(CC) -isystem include $(CFLAGS) -fPIC -nostdlib -o $@ $^ -DDIETHOME=\"$(HOME)\" -D__DYN_LIB -DVERSION=\"$(VERSION)\" -L$(PICODIR) -lc -lgcc $(PICODIR)/dyn_stop.o -Wl,-dynamic-linker=$(HOME)/$(PICODIR)/libdl.so
- $(CROSS)strip -R .command -R .note $@
+ $(STRIP) -R .command -R .note $@
$(PICODIR)/diet-dyn-i: $(PICODIR)/start.o $(PICODIR)/dyn_start.o diet.c
$(LD_UNSET) $(CROSS)$(CC) -isystem include $(CFLAGS) -fPIC -nostdlib -o $@ $^ -DDIETHOME=\"$(prefix)\" -D__DYN_LIB -DVERSION=\"$(VERSION)\" -L$(PICODIR) -lc -lgcc $(PICODIR)/dyn_stop.o -Wl,-dynamic-linker=$(ILIBDIR)/libdl.so -DINSTALLVERSION
- $(CROSS)strip -R .command -R .note $@
+ $(STRIP) -R .command -R .note $@
$(OBJDIR)/djb: $(OBJDIR)/compile $(OBJDIR)/load
--
1.6.2.5

View file

@ -1,461 +0,0 @@
From 7227ec436a737f13d8bc1fd9bf8f8995d073eb0b Mon Sep 17 00:00:00 2001
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Date: Sat, 19 Apr 2008 17:41:23 +0200
Subject: [PATCH 16/18] Several testsuite fixes/enhancments
* test/getmntent.c: I removed the checks which called endmntent()
multiple times resp. with a NULL pointer. Behavior in first
case is undefined and latter causes a segfault (I could not
find documentation that this is allowed). Hence, it does not
make sense to test this.
* test/stdlib/tst-malloc.c: test 'malloc(0)' only, when
WANT_MALLOC_ZERO is set
* test/time/tst-strftime.c: the '%Zu' printf format specifier is
bogus (from libc5 ages). I replaced it with the '%zu' one.
Please note, that this test still fails because it uses glibc
specific features.
* test/time/tst-strptime.c: removed tests which set a non-C
locale. Broken usage of 'strptime()' result was fixed too.
This test should succeed now.
* test/math.c: this test was added while working on the '%F/%G'
patch and verifies the isinf() + isnan() functions.
* fixes lot of broken printf() format specifiers
* fixes tests using isinf(); the math.c test checks the dietlibc
implementation of isinf() (which differs between positive and
negative inf). All other tests use boolean retval only and test
for the signess of the values
---
test/Makefile | 2 +-
test/asprintf.c | 2 +-
test/bsearch.c | 2 +-
test/byteswap.c | 8 ++++----
test/cycles.c | 2 +-
test/getmntent.c | 6 +-----
test/math.c | 29 +++++++++++++++++++++++++++++
test/mktime.c | 6 +++---
test/printftest.c | 6 +++---
test/rand48.c | 12 ++++++------
test/runtests.sh | 2 +-
test/speed.c | 4 ++--
test/stdio/tstscanf.c | 4 ++--
test/stdlib/tst-malloc.c | 6 +++++-
test/stdlib/tst-strtod.c | 4 ++--
test/sysenter.c | 6 +++---
test/time/tst-strftime.c | 6 +++---
test/time/tst-strptime.c | 23 ++++++++++++++++++++---
18 files changed, 88 insertions(+), 42 deletions(-)
create mode 100644 test/math.c
diff --git a/test/Makefile b/test/Makefile
index ff416cf..537b32f 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -10,7 +10,7 @@ LCOMPAT=-lcompat
TESTPROGRAMS=adjtime argv asprintf atexit bsearch byteswap calloc confstr cycles empty flush fnmatch \
fputc ftw fwrite getaddrinfo getenv getgrnam gethostbyaddr gethostbyname \
gethostbyname_r getmntent getopt getpass getpwnam getservbyname getservbyport getusershell \
-glob grent hasmntopt hello iconv if_nameindex ltostr malloc-debugger md5_testharness \
+glob grent hasmntopt hello iconv if_nameindex ltostr malloc-debugger math md5_testharness \
memccpy memchr memcmp memrchr memusage mktime mmap_test pipe printf printftest \
protoent prototypes putenv pwent rand48 read1 readdir regex select sendfile servent siglist \
speed spent sprintf sscanf stdarg strcasecmp strcmp strncat strncpy strptime strrchr \
diff --git a/test/asprintf.c b/test/asprintf.c
index 996a5aa..0d4f2eb 100644
--- a/test/asprintf.c
+++ b/test/asprintf.c
@@ -13,7 +13,7 @@ int main(int argc, char **argv) {
assert(strlen(path) == asprintlen);
printf("%s\n", path);
- asprintlen=asprintf(&path, "/proc" "/%d/stat", strlen(argv[1]));
+ asprintlen=asprintf(&path, "/proc" "/%zu/stat", strlen(argv[1]));
assert(strlen(path) == asprintlen);
printf("%s\n", path);
diff --git a/test/bsearch.c b/test/bsearch.c
index 961ad35..ede4c88 100644
--- a/test/bsearch.c
+++ b/test/bsearch.c
@@ -35,7 +35,7 @@ int main() {
die("bsearch returned NULL\n");
}
if (k != array+i) die("bsearch found wrong element\n");
- printf("%d\n",k-array);
+ printf("%ld\n",k-array);
}
}
return 0;
diff --git a/test/byteswap.c b/test/byteswap.c
index 19239dd..6f43c25 100644
--- a/test/byteswap.c
+++ b/test/byteswap.c
@@ -9,12 +9,12 @@ int main() {
snprintf(buf,100,"%x %x", bswap_16(0x1234), bswap_16(0x5678));
assert(strcmp(buf, "3412 7856") == 0);
- printf("%lx\n",bswap_32(0x12345678));
- snprintf(buf,100,"%lx", bswap_32(0x12345678));
+ printf("%x\n",(unsigned int)bswap_32(0x12345678));
+ snprintf(buf,100,"%x", (unsigned int)bswap_32(0x12345678));
assert(strcmp(buf, "78563412") == 0);
- printf("%qx\n",bswap_64(0x123456789ABCDEFull));
- snprintf(buf,100,"%qx", bswap_64(0x123456789ABCDEFull));
+ printf("%llx\n",(unsigned long long)bswap_64(0x123456789ABCDEFull));
+ snprintf(buf,100,"%llx", (unsigned long long)bswap_64(0x123456789ABCDEFull));
assert(strcmp(buf, "efcdab8967452301") == 0);
return 0;
}
diff --git a/test/cycles.c b/test/cycles.c
index 35547f8..a4cb8c8 100644
--- a/test/cycles.c
+++ b/test/cycles.c
@@ -24,7 +24,7 @@ int main(int argc,char* argv[]) {
if (!fork()) { execve(argv[1],argv+1,environ); exit(1); }
wait(0);
RDTSC(b);
- printf("%llu cycles\n",b-a);
+ printf("%llu cycles\n",(unsigned long long)(b-a));
return 0;
}
diff --git a/test/getmntent.c b/test/getmntent.c
index fc17a83..1039d06 100644
--- a/test/getmntent.c
+++ b/test/getmntent.c
@@ -33,10 +33,6 @@ while ((e = getmntent(fstab))) {
printf("closing /etc/fstab\n");
assert ( 1 == endmntent(fstab));
- printf("closing /etc/fstab again\n");
- assert ( 1 == endmntent(fstab)); /* endmntent must always return 1 */
- printf("entmntent(0)\n");
- assert ( 1 == endmntent(0)); /* causes a segfault with diet libc */
+
return 0;
}
-
diff --git a/test/math.c b/test/math.c
new file mode 100644
index 0000000..687103c
--- /dev/null
+++ b/test/math.c
@@ -0,0 +1,29 @@
+#include <math.h>
+#include <float.h>
+#include <assert.h>
+
+int main()
+{
+ extern int __isinf(double d);
+ extern int __isnan(double d);
+
+#if (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3))
+ assert(__isinf(__builtin_inff()) == +1);
+ assert(__isinf(-__builtin_inff()) == -1);
+
+ assert(__isinf(__builtin_inf()) == +1);
+ assert(__isinf(-__builtin_inf()) == -1);
+
+ assert(__isnan(__builtin_nan("")));
+#endif
+
+ assert(__isinf((DBL_MAX * DBL_MAX)) == +1);
+ assert(__isinf(-(DBL_MAX * DBL_MAX)) == -1);
+
+ assert(isinf((DBL_MAX * DBL_MAX)));
+ assert(isinf(-(DBL_MAX * DBL_MAX)));
+
+ //assert(isnan(nan("")));
+
+ return 0;
+}
diff --git a/test/mktime.c b/test/mktime.c
index 5e9e65c..9b4bd5e 100644
--- a/test/mktime.c
+++ b/test/mktime.c
@@ -9,15 +9,15 @@ int main() {
t.tm_mday=29;
t.tm_mon=2;
t.tm_year=100;
- printf("%d\n",mktime(&t));
+ printf("%ld\n",(long)mktime(&t));
t.tm_mday=1;
t.tm_mon=3;
t.tm_year=102;
- printf("%d\n",mktime(&t));
+ printf("%ld\n",(long)mktime(&t));
t.tm_mday=1;
t.tm_mon=6;
t.tm_year=102;
- printf("%d\n",mktime(&t));
+ printf("%ld\n",(long)mktime(&t));
return 0;
}
diff --git a/test/printftest.c b/test/printftest.c
index 4743279..47d9580 100644
--- a/test/printftest.c
+++ b/test/printftest.c
@@ -101,8 +101,8 @@ int main()
printf("#%i#\n",18);
printf("#%d#\n",18);
printf("#%u#\n",18);
- printf("#%lu#\n",18);
- printf("#%li#\n",18);
+ printf("#%lu#\n",18l);
+ printf("#%li#\n",18l);
printf("#%-+#06d#\n", -123);
printf("#%-+#6d#\n", -123);
printf("#%+#06d#\n", -123);
@@ -142,7 +142,7 @@ int main()
buf);
memset(buf2,0,sizeof(buf));
i=snprintf(buf2, 256, "%.9999u", 10);
- printf("%i %i\n",i,strlen(buf2));
+ printf("%i %li\n",i,strlen(buf2));
printf ("snprintf (\"%%.999999u\", 10) == %d\n",
snprintf(buf2, sizeof(buf2), "%.999999u", 10));
diff --git a/test/rand48.c b/test/rand48.c
index 4f5b08f..1e67632 100644
--- a/test/rand48.c
+++ b/test/rand48.c
@@ -6,16 +6,16 @@ main (void)
{
static unsigned short data[7] = { 1, 2, 3, 4, 5, 6, 7 };
- printf ("one %X\n", mrand48 ());
- printf ("two %X\n", mrand48 ());
- printf ("three %X\n", mrand48 ());
+ printf ("one %lX\n", mrand48 ());
+ printf ("two %lX\n", mrand48 ());
+ printf ("three %lX\n", mrand48 ());
lcong48 (data);
printf ("after lcong48:\n");
- printf ("one %X\n", mrand48 ());
- printf ("two %X\n", mrand48 ());
- printf ("three %X\n", mrand48 ());
+ printf ("one %lX\n", mrand48 ());
+ printf ("two %lX\n", mrand48 ());
+ printf ("three %lX\n", mrand48 ());
return 0;
}
diff --git a/test/runtests.sh b/test/runtests.sh
index 908caa5..fcd3202 100644
--- a/test/runtests.sh
+++ b/test/runtests.sh
@@ -1,6 +1,6 @@
SUBDIRS="dirent inet stdio string stdlib time"
-TESTPROGRAMS="adjtime argv atexit bsearch byteswap calloc confstr empty flush fputc ffs fnmatch ftw fwrite getaddrinfo getenv getdelim getgrnam gethostbyaddr gethostbyname gethostbyname_r getmntent getopt getpwnam getservbyname getservbyport getusershell glob grent hasmntopt hello iconv if_nameindex ltostr malloc-debugger md5_testharness memccpy memchr memcmp memrchr memusage mktime mmap_test pipe printf printftest protoent prototypes putenv pwent rand48 readdir regex select sendfile servent siglist speed spent sprintf sscanf stdarg strcasecmp strcmp strncat strncpy strptime strrchr strstr strtol sysconf sysenter ungetc waitpid"
+TESTPROGRAMS="adjtime argv atexit bsearch byteswap calloc confstr empty flush fputc ffs fnmatch ftw fwrite getaddrinfo getenv getdelim getgrnam gethostbyaddr gethostbyname gethostbyname_r getmntent getopt getpwnam getservbyname getservbyport getusershell glob grent hasmntopt hello iconv if_nameindex ltostr malloc-debugger math md5_testharness memccpy memchr memcmp memrchr memusage mktime mmap_test pipe printf printftest protoent prototypes putenv pwent rand48 readdir regex select sendfile servent siglist speed spent sprintf sscanf stdarg strcasecmp strcmp strncat strncpy strptime strrchr strstr strtol sysconf sysenter ungetc waitpid"
STDIN="read1"
PASS="getpass"
diff --git a/test/speed.c b/test/speed.c
index 674b9a8..22249a7 100644
--- a/test/speed.c
+++ b/test/speed.c
@@ -7,10 +7,10 @@ int main() {
int i;
time_t t;
- printf("%d\n", time(0));
+ printf("%ld\n", (long)time(0));
for (i=0; i<10000000; ++i)
t=time(0);
- printf("%d\n", time(0));
+ printf("%ld\n", (long)time(0));
return 0;
}
diff --git a/test/stdio/tstscanf.c b/test/stdio/tstscanf.c
index 44ddf49..0f55c3c 100644
--- a/test/stdio/tstscanf.c
+++ b/test/stdio/tstscanf.c
@@ -338,14 +338,14 @@ main (int argc, char **argv)
int res;
res = sscanf ("-InF", "%f", &value);
- if (res != 1 || isinf (value) != -1)
+ if (res != 1 || !isinf (value) || !(value<0))
{
fputs ("test failed!\n", stdout);
result = 1;
}
res = sscanf ("+InfiNiTY", "%f", &value);
- if (res != 1 || isinf (value) != 1)
+ if (res != 1 || !isinf (value) || !(value>0))
{
fputs ("test failed!\n", stdout);
result = 1;
diff --git a/test/stdlib/tst-malloc.c b/test/stdlib/tst-malloc.c
index 09fbb1f..4a491d9 100644
--- a/test/stdlib/tst-malloc.c
+++ b/test/stdlib/tst-malloc.c
@@ -21,13 +21,15 @@
#include <stdlib.h>
#include <stdio.h>
+#include "../../dietfeatures.h"
+
static int errors = 0;
static void
merror (const char *msg)
{
++errors;
- printf ("Error: %s\n", msg);
+ fprintf (stderr, "Error: %s\n", msg);
}
int
@@ -56,9 +58,11 @@ main (void)
if (p != NULL)
merror ("realloc (p, 0) failed.");
+#ifdef WANT_MALLOC_ZERO
p = malloc (0);
if (p == NULL)
merror ("malloc (0) failed.");
+#endif
p = realloc (p, 0);
if (p != NULL)
diff --git a/test/stdlib/tst-strtod.c b/test/stdlib/tst-strtod.c
index 630a8fc..bacdca7 100644
--- a/test/stdlib/tst-strtod.c
+++ b/test/stdlib/tst-strtod.c
@@ -149,10 +149,10 @@ main (int argc, char ** argv)
}
const char input2[] = "+1.000000000116415321826934814453125";
- if (strtold (input2, NULL) != +1.000000000116415321826934814453125)
+ if (strtold (input2, NULL) != +1.000000000116415321826934814453125L)
{
printf ("input2: %La != %La\n", strtold (input2, NULL),
- +1.000000000116415321826934814453125);
+ +1.000000000116415321826934814453125L);
status = 1;
}
diff --git a/test/sysenter.c b/test/sysenter.c
index a8fa3a8..3d85916 100644
--- a/test/sysenter.c
+++ b/test/sysenter.c
@@ -11,11 +11,11 @@ int main() {
int i;
for (i=0; environ[i]; ++i) ;
for (x=(struct elf_aux*)(environ+i+1); x->type; ++x) {
- printf("%d %x\n",x->type,x->value);
+ printf("%ld %lx\n",x->type,x->value);
if (x->type==AT_PAGESZ)
- printf("pagesize %d\n",x->value);
+ printf("pagesize %ld\n",x->value);
else if (x->type==AT_SYSINFO)
- printf("vsyscall %p\n",x->value);
+ printf("vsyscall %p\n",(void *)x->value);
}
return 0;
}
diff --git a/test/time/tst-strftime.c b/test/time/tst-strftime.c
index e092e93..27db9a4 100644
--- a/test/time/tst-strftime.c
+++ b/test/time/tst-strftime.c
@@ -49,18 +49,18 @@ int main (void) {
if (res == 0)
{
- printf ("%Zu: %s: res == 0 despite size == %Zu\n",
+ printf ("%zu: %s: res == 0 despite size == %zu\n",
cnt, tests[cnt].fmt, size);
result = 1;
}
else if (size < tests[cnt].min)
{
- printf ("%Zu: %s: size == %Zu was enough\n",
+ printf ("%zu: %s: size == %zu was enough\n",
cnt, tests[cnt].fmt, size);
result = 1;
}
else
- printf ("%Zu: %s: size == %Zu: OK\n", cnt, tests[cnt].fmt, size);
+ printf ("%zu: %s: size == %zu: OK\n", cnt, tests[cnt].fmt, size);
free (buf);
}
diff --git a/test/time/tst-strptime.c b/test/time/tst-strptime.c
index 6277ea6..2773180 100644
--- a/test/time/tst-strptime.c
+++ b/test/time/tst-strptime.c
@@ -41,10 +41,12 @@ static const struct
{ "C", "03/03/00", "%D", 5, 62, 2, 3 },
{ "C", "9/9/99", "%x", 4, 251, 8, 9 },
{ "C", "19990502123412", "%Y%m%d%H%M%S", 0, 121, 4, 2 },
+#if 0 /* dietlibc does not support %U/%W/%j and non-POSIX locales */
{ "C", "2001 20 Mon", "%Y %U %a", 1, 140, 4, 21 },
{ "C", "2001 21 Mon", "%Y %W %a", 1, 140, 4, 21 },
{ "ja_JP.EUC-JP", "2001 20 \xb7\xee", "%Y %U %a", 1, 140, 4, 21 },
{ "ja_JP.EUC-JP", "2001 21 \xb7\xee", "%Y %W %a", 1, 140, 4, 21 },
+#endif
};
@@ -72,9 +74,16 @@ test_tm (void)
for (i = 0; i < sizeof (tm_tests) / sizeof (tm_tests[0]); ++i)
{
+ char *pres;
memset (&tm, '\0', sizeof (tm));
-
- if (strptime (tm_tests[i].input, tm_tests[i].format, &tm) != '\0')
+
+ pres = strptime (tm_tests[i].input, tm_tests[i].format, &tm);
+ if (!pres)
+ {
+ fprintf(stderr, "failed to parse '%s'\n", day_tests[i].input);
+ result = 1;
+ }
+ else if (*pres != '\0')
{
printf ("not all of `%s' read\n", tm_tests[i].input);
result = 1;
@@ -118,6 +127,7 @@ int main (void) {
for (i = 0; i < sizeof (day_tests) / sizeof (day_tests[0]); ++i)
{
+ char *pres;
memset (&tm, '\0', sizeof (tm));
if (setlocale (LC_ALL, day_tests[i].locale) == NULL)
@@ -125,7 +135,14 @@ int main (void) {
printf ("cannot set locale %s: %m\n", day_tests[i].locale);
}
- if (*strptime (day_tests[i].input, day_tests[i].format, &tm) != '\0')
+ pres = strptime (day_tests[i].input, day_tests[i].format, &tm);
+ if (!pres)
+ {
+ fprintf(stderr, "failed to parse '%s' for locale '%s'\n",
+ day_tests[i].input, day_tests[i].locale);
+ result = 1;
+ }
+ else if (*pres != '\0')
{
printf ("not all of `%s' read\n", day_tests[i].input);
result = 1;
--
1.6.2.5

View file

@ -1,67 +0,0 @@
From 7bf571cbff4c43098d9b1cd2b4bbd9457bff5b60 Mon Sep 17 00:00:00 2001
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Date: Sat, 19 Apr 2008 17:45:11 +0200
Subject: [PATCH 10/18] Use stdout instead of stderr in testsuite
This patches uses stdout instead stderr when giving out normal status
messages in the testsuite.
---
test/atexit.c | 2 +-
test/malloc-debugger.c | 2 +-
test/sendfile.c | 2 +-
test/waitpid.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/test/atexit.c b/test/atexit.c
index 709a3e4..79ee392 100644
--- a/test/atexit.c
+++ b/test/atexit.c
@@ -2,7 +2,7 @@
#include <unistd.h>
void blah(void) {
- write(2,"atexit\n",7);
+ write(1,"atexit\n",7);
}
int main() {
diff --git a/test/malloc-debugger.c b/test/malloc-debugger.c
index 040196e..058807e 100644
--- a/test/malloc-debugger.c
+++ b/test/malloc-debugger.c
@@ -4,7 +4,7 @@
int main() {
char* c=malloc(13);
char* tmp;
- fprintf(stderr,"got %p\n",c);
+ fprintf(stdout,"got %p\n",c);
c[0]=14;
// c[15]=0;
tmp=realloc(c,12345);
diff --git a/test/sendfile.c b/test/sendfile.c
index d43cdd2..28b3af5 100644
--- a/test/sendfile.c
+++ b/test/sendfile.c
@@ -11,5 +11,5 @@ int main() {
printf("sendfile returned %d\n",ret);
-return 0;
+ return ret<0 ? 1 : 0;
}
diff --git a/test/waitpid.c b/test/waitpid.c
index fe2cb5b..92c0b0e 100644
--- a/test/waitpid.c
+++ b/test/waitpid.c
@@ -11,7 +11,7 @@ int main() {
perror("fork");
_exit(1);
case 0:
- fprintf(stderr,"child, my pid is %u\n",getpid());
+ fprintf(stdout,"child, my pid is %u\n",getpid());
sleep(1);
_exit(23);
}
--
1.6.2.5

33
dietlibc-c99.patch Normal file
View file

@ -0,0 +1,33 @@
Changes to avoid implicit function declarations: <arpa/inet.h>
provides a declaration of noths. -D_BSD_SOURCE enables declarations
of random, srandom.
diff -ur dietlibc-0.34.orig/test/getservbyname.c dietlibc-0.34/test/getservbyname.c
--- dietlibc-0.34.orig/test/getservbyname.c 2003-12-15 14:07:42.000000000 +0100
+++ dietlibc-0.34/test/getservbyname.c 2022-12-23 18:17:26.645479365 +0100
@@ -1,5 +1,6 @@
#include <stdio.h>
#include <netdb.h>
+#include <arpa/inet.h>
int main(int argc,char *argv[]) {
struct servent* se;
diff -ur dietlibc-0.34.orig/test/stdlib/testsort.c dietlibc-0.34/test/stdlib/testsort.c
--- dietlibc-0.34.orig/test/stdlib/testsort.c 2003-12-15 14:07:42.000000000 +0100
+++ dietlibc-0.34/test/stdlib/testsort.c 2022-12-23 18:16:33.758018509 +0100
@@ -1,3 +1,4 @@
+#define _BSD_SOURCE
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
diff -ur dietlibc-0.34.orig/test/stdlib/tst-calloc.c dietlibc-0.34/test/stdlib/tst-calloc.c
--- dietlibc-0.34.orig/test/stdlib/tst-calloc.c 2003-12-15 14:07:42.000000000 +0100
+++ dietlibc-0.34/test/stdlib/tst-calloc.c 2022-12-23 18:16:49.272860349 +0100
@@ -17,6 +17,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#define _BSD_SOURCE
#include <errno.h>
#include <limits.h>
#include <malloc.h>

View file

@ -0,0 +1,11 @@
--- include/paths.h~ 2008-02-22 18:09:54.000000000 -0600
+++ include/paths.h 2016-07-25 12:03:25.144058895 -0500
@@ -2,7 +2,7 @@
#define _PATHS_H
#define _PATH_BSHELL "/bin/sh"
-#define _PATH_DEFPATH "/bin:/usr/bin:"
+#define _PATH_DEFPATH "/bin:/usr/bin"
#define _PATH_DEVNULL "/dev/null"

View file

@ -1,11 +1,13 @@
## This package understands the following switches:
## --with[out] ssp ... enable/disable SSP; default depends
## on target architecture
## --with dynamic ... enable dynamic lib support
# Disabled per upstream to fix FTBFS.
%undefine _hardened_build
#global snapshot 20090228
%global pkglibdir %_prefix/lib/dietlibc
#%%global prerelease 20170317
#%%global githubref c3f1cf67fcc186bb859e64a085bf98aaa6182a82
%global pkglibdir %{_prefix}/lib/dietlibc
%ifarch %ix86 x86_64
%bcond_without ssp
@ -13,77 +15,51 @@
%bcond_with ssp
%endif
%ifarch %ix86 x86_64 arm
%bcond_with dynamic
%endif
%ifarch %ix86
%global target_cpu i386
%else
%global target_cpu %_target_cpu
%endif
%{!?release_func:%global release_func() %1%{?dist}}
%{!?apply:%global apply(p:n:b:) %patch%%{-n:%%{-n*}} %%{-p:-p %%{-p*}} %%{-b:-b %%{-b*}} \
%nil}
Summary: Small libc implementation
Name: dietlibc
Version: 0.32
Release: %release_func 0%{?snapshot:.%snapshot}
License: GPLv2
Group: Development/Libraries
Version: 0.34
Release: 20%{?dist}
License: GPL-2.0-only
URL: http://www.fefe.de/dietlibc/
%if !0%{?snapshot:1}
Source0: http://www.kernel.org/pub/linux/libs/dietlibc/%name-%version.tar.bz2
Source1: http://www.fefe.de/dietlibc/%name-%version.tar.bz2.sig
%if !0%{?prerelease:1}
Source0: https://www.fefe.de/dietlibc/%{name}-%{version}.tar.xz
Source1: http://www.fefe.de/dietlibc/%{name}-%{version}.tar.xz.sig
%else
# generated by 'make cvs-sources [CVS_DATE=....]'
Source0: %name-%version.%snapshot.tar.bz2
Source0: %{name}-%{version}.%prerelease.tar.xz
%endif
Source10: runtests-X.sh
Patch1: dietlibc-0.28-setpriority.patch
Patch10: dietlibc-0.29-scall.patch
Patch20: dietlibc-0.29-nostackprotector.patch
Patch30: dietlibc-0.30-longdouble.patch
Patch31: dietlibc-0.31-defpath.patch
Patch32: dietlibc-0.31-stacksmash.patch
Patch33: dietlibc-0.31-stacksmash-dyn.patch
Patch41: dietlibc-0.31.20080212-teststdout.patch
Patch43: dietlibc-0.31-pagesize.patch
Patch44: dietlibc-0.31-printFG.patch
Patch46: dietlibc-0.31-testsuite.patch
Patch47: dietlibc-0.31-lcctime.patch
Patch48: dietlibc-0.31-implicitfunc.patch
Patch49: dietlibc-0.31-noreturn.patch
Patch50: dietlibc-0.31-no-stack-protector.patch
Patch51: dietlibc-0.31-smp-fix.patch
Patch52: dietlibc-0.31-stackgap-minor.patch
Patch53: dietlibc-0.31-strip.patch
BuildRoot: %_tmppath/%name-%version-%release-buildroot
%{?with_dynamic:Requires: dietlibc-lib = %version-%release}
%{!?with_dynamic:Obsoletes: dietlibc-lib < %version-%release}
## CVS..master diff from https://github.com/ensc/dietlibc
#Patch0: dietlibc-github-%%githubref.patch.gz
Patch1: dietlibc-insecure-defpath.patch
Patch2: dietlibc-c99.patch
#Requires: dietlibc-lib = %%{version}-%%{release}}
Obsoletes: dietlibc-lib < %{version}-%{release}
Requires: %name-devel = %version-%release
Requires: %{name}-devel = %{version}-%{release}
BuildRequires: gcc
BuildRequires: gdb
BuildRequires: make
%package devel
Summary: dietlibc development files
Group: Development/Libraries
Requires: %name = %version-%release
Requires: %name-header = %version-%release
%package header
Summary: dietlibc header files
Group: Development/Libraries
Requires: %name = %version-%release
Requires(pre): %name-devel = %version-%release
Requires: %name-devel = %version-%release
BuildArch: noarch
Requires: %{name} = %{version}-%{release}
Obsoletes: %{name}-header < %{version}-%{release}
Provides: %{name}-header = %{version}-%{release}
Provides: %{name}-static = %{version}-%{release}
Provides: %{name}-static%{?_isa} = %{version}-%{release}
%package lib
Summary: Dynamic libraries for dietlibc
Group: System Environment/Libraries
Conflicts: %name < %version-%release
Conflicts: %name > %version-%release
Requires: %{name} = %{version}-%{release}
%description
The diet libc is a libc that is optimized for small size. It can be
@ -97,13 +73,6 @@ arm, hppa, ia64, i386, mips, s390, sparc, sparc64, ppc and x86_64.
This package contains the object files for dietlibc.
%description header
The diet libc is a libc that is optimized for small size. It can be
used to create small statically linked binaries for Linux on alpha,
arm, hppa, ia64, i386, mips, s390, sparc, sparc64, ppc and x86_64.
This package contains the header files for dietlibc.
%description lib
The diet libc is a libc that is optimized for small size. It can be
used to create small statically linked binaries for Linux on alpha,
@ -113,29 +82,14 @@ This package contains the dynamic libraries for dietlibc.
%prep
%setup -q %{?snapshot:-n %name-%version.%snapshot}
%patch1 -p1 -b .nice
%patch51 -p1 -b .smp
%patch53 -p1 -b .strip
%patch50 -p1 -b .no-stack-protector
%setup -q %{?prerelease:-n %{name}-%{version}.%prerelease}
%dnl %setup -qn dietlibc
%patch10 -p1 -b .scall
%patch30 -p1 -b .longdouble
%patch31 -p1 -b .defpath
%patch32 -p1 -b .stacksmash
%patch33 -p1 -b .stacksmash-dyn
%patch41 -p1 -b .teststdout
%patch43 -p1 -b .pagesize
%patch44 -p1 -b .printFG
%patch46 -p1 -b .testsuite
%patch47 -p1 -b .lcctime
%patch48 -p1 -b .implicitfunc
%patch49 -p1 -b .noreturn
%patch52 -p1 -b .stackgap
%dnl %apply -n0 -p1
%patch -P 1 -p0
%patch -P 2 -p1
%if %{without ssp}
%patch20 -p1 -b .nostackprotector
sed -i -e 's!^#define WANT_SSP$!// \0!g;
s!.*\(#define WANT_STACKGAP\).*!\1!g' dietfeatures.h
%global xtra_fixcflags -fno-stack-protector
@ -143,40 +97,43 @@ sed -i -e 's!^#define WANT_SSP$!// \0!g;
%global xtra_fixcflags %nil
%endif
%ifarch %ix86
sed -i \
-e '/#define \(WANT_LARGEFILE_BACKCOMPAT\|WANT_VALGRIND_SUPPORT\)/d' \
dietfeatures.h
%ifarch %ix86 arm
sed -i \
-e '/#define WANT_DYN_PAGESIZE/{c\' \
-e '#define WANT_ELFINFO' \
-e '#define WANT_ELFINFO' \
-e '}' \
dietfeatures.h
%endif
%global fixcflags -fomit-frame-pointer -fno-exceptions -fno-asynchronous-unwind-tables %xtra_fixcflags -Os -g3 -Werror-implicit-function-declaration
%global basemakeflags prefix=%pkglibdir BINDIR=%_bindir MAN1DIR=%_mandir/man1 CFLAGS="$RPM_OPT_FLAGS %fixcflags $XTRA_CFLAGS" PDIET=%pkglibdir STRIP=:
%global fixcflags -fomit-frame-pointer -fno-exceptions -fno-asynchronous-unwind-tables %xtra_fixcflags -Os -g3 -Werror-implicit-function-declaration -Wno-unused -Wno-switch -std=gnu17
%global basemakeflags prefix=%pkglibdir BINDIR=%{_bindir} MAN1DIR=%{_mandir}/man1 CFLAGS="$RPM_OPT_FLAGS %fixcflags $XTRA_CFLAGS" PDIET=%pkglibdir STRIP=:
%global makeflags %basemakeflags
for i in `find test -name 'runtests.sh'`; do
ln -s %SOURCE10 `dirname $i`/runtests-X.sh
done
%build
# This package strips .o files as they are created which removes the LTO
# sections. It's likely this would work if those strip commands were
# changed to leave the LTO sections alone. For now, disable LTO
%define _lto_cflags %{nil}
make %makeflags all %{?_smp_mflags}
# 'dyn' target is not SMP safe
%{?with_dynamic:make %makeflags dyn}
#make %%makeflags dyn
%install
rm -rf $RPM_BUILD_ROOT
install -d -m755 $RPM_BUILD_ROOT/etc
make %makeflags DESTDIR=$RPM_BUILD_ROOT install
ln -s lib-%_arch ${RPM_BUILD_ROOT}%pkglibdir/lib-%_arch-%_vendor
ln -s lib-%{_arch} ${RPM_BUILD_ROOT}%pkglibdir/lib-%{_arch}-%{_vendor}
chmod a-x $RPM_BUILD_ROOT%pkglibdir/lib-*/*.o
rm -f $RPM_BUILD_ROOT%_bindir/dnsd
rm -f $RPM_BUILD_ROOT%{_bindir}/dnsd
%check
@ -185,47 +142,213 @@ make %makeflags -C test all %{?_smp_mflags} DIET=$(echo `pwd`/bin-*/diet) -
make %makeflags -C test/inet all %{?_smp_mflags} DIET=$(echo `pwd`/bin-*/diet) || :
cd test
ulimit -m $[ 128*1024 ] -v $[ 256*1024 ] -d $[ 128*1024 ]
ulimit -m $[ 128*1024 ] -v $[ 256*1024 ] -d $[ 128*1024 ] -s 512
bash ./runtests-X.sh
#bash ./runtests-X.sh
%clean
rm -rf $RPM_BUILD_ROOT
%changelog
%files
%defattr(-,root,root,-)
%doc AUTHOR BUGS CAVEAT CHANGES COPYING FAQ PORTING README*
%doc SECURITY THANKS TODO
%doc %_mandir/*/*
%_bindir/*
%files header
%defattr(-,root,root,-)
%pkglibdir/include
%doc %{_mandir}/*/*
%{_bindir}/*
%files devel
%defattr(-,root,root,-)
%pkglibdir
%exclude %pkglibdir/include
%{?with_dynamic:%exclude %pkglibdir/*/*.so}
%if %{with dynamic}
%files lib
%defattr(-,root,root,-)
%config(noreplace) %_sysconfdir/*
%dir %pkglibdir
%dir %pkglibdir/lib-*
%pkglibdir/lib-%target_cpu/*.so
%endif
%changelog
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.34-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.34-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.34-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.34-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.34-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Aug 24 2023 Gwyn Ciesla <gwync@protonmail.com> - 0.34-15
- Fix FTBFS
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.34-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Mar 07 2023 Gwyn Ciesla <gwync@protonmail.com> - 0.34-13
- migrated to SPDX license
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.34-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Dec 23 2022 Florian Weimer <fweimer@redhat.com> - 0.34-11
- C99 compatibility fixes (#2156074)
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.34-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.34-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.34-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.34-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.34-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Jul 13 2020 Jeff Law <law@redhat.com> - 0.34-5
- Disable LTO
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.34-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.34-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.34-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Tue Sep 25 2018 Gwyn Ciesla <limburgher@gmail.com> - 0.34-1
- 0.34
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.34-0.6.20170317
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.34-0.5.20170317
- Escape macros in %%changelog
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.34-0.4.20170317
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.34-0.3.20170317
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.34-0.2.20170317
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 18 2017 Richard W.M. Jones <rjones@redhat.com> - 0.34-0.1
- Move to much newer upstream version which supports aarch64 and POWER.
- Fix bogus date in changelog.
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.33-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Thu Sep 15 2016 Dan Horák <dan[at]danny.cz> - 0.33-10
- Enable s390x build
* Fri Aug 12 2016 Peter Robinson <pbrobinson@fedoraproject.org> - 0.33-9
- Exclude aarch64 Power64 s390x
* Mon Jul 25 2016 Jon Ciesla <limburgher@gmail.com> - 0.33-8
- Patch for insecure defpath, BZ 1359768.
* Thu Apr 07 2016 Jon Ciesla <limburgher@gmail.com> - 0.33-7
- Spec cleanup.
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.33-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.33-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Mon Nov 17 2014 Jon Ciesla <limburgher@gmail.com> - 0.33-4
- Fix FTBFS using latest official cvs which drops a test script.
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.33-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.33-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Thu Apr 24 2014 Jon Ciesla <limburgher@gmail.com> - 0.33-1
- Latest upstream.
* Tue Sep 17 2013 Jon Ciesla <limburgher@gmail.com> - 0.33-0.1904.20120825
- Fix typo in %%files, BZ 1008729.
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.33-0.1903.20120825
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Wed Mar 20 2013 Jon Ciesla <limburgher@gmail.com> - 0.33-0.1902.20120825
- Macro cleanup.
- Merge header subpackage into devel.
- Converted lib <> Conflicts to Requires =.
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.33-0.1901.20120825
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Sun Aug 26 2012 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.33-0.1900.20120825
- updated to recent snapshot
- fixed s390 issues (reported and patched by Dan Horák)
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.33-0.1804.20120330
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Sun Apr 29 2012 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.33-0.1803.20120330
- reverted removal of kernel headers; causes too much trouble
* Sun Apr 29 2012 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.33-0.1802.20120330
- removed local include/linux headers; shipped ones are outdated and
do not work well with those from the kernel-headers package
- added some '-Wno-*' build flags
* Thu Apr 5 2012 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.33-0.1801.20120330
- updated git-patch (fstatat(2) implementation + actime_r(3) fixes)
- removed local runtests-X.sh; it is in git already
* Sat Mar 31 2012 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.33-0.1800.20120330
- updated to 20120330 CVS snapshot
- versionized the patchset fetched from github
- fixed build on armv7+ systems (#800601)
* Sat Jan 14 2012 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.33-0.1700.20111222
- updated to 20111222 CVS snapshot
- rediffed + updated patchset
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.33-0.1601.20110311
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Sat Mar 12 2011 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.33-0.1600.20110311
- updated to 20110311 CVS snapshot
- set fixed page size for arm
- disabled linux 2.2/2.4 compatibility code + valgrind nice mode
- reduced stack size for testsuite
- rediffed patches
* Sun Feb 20 2011 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.33-0.1600.20101223
- other ARM enhancements
- fixed missing headers in last utime(2) + fadvise(2) patches
* Sun Feb 20 2011 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.33-0.1505.20101223
- further ARM fixes
- global fixes for utime(2), fadvise*(2)
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.33-0.1504.20101223
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Fri Jan 14 2011 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
- added common alarm(2) implementation
* Sun Jan 9 2011 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.33-0.1502.20101223
- replaced all the single patches with a big one from
https://github.com/ensc/dietlibc/commits/rebase
- various ARM-EABI fixes (667852)
* Fri Dec 24 2010 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.33-0.1500.20101223
- updated to 20101223 CVS snapshot
* Fri Jul 9 2010 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.32-1400
- added -static provides (#609606)
- use %%apply, not %%patch
- updated %%release_func macro
* Sat Jul 25 2009 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.32-0
- updated to 0.32
- fixed stackgap/auxvec patch
@ -288,7 +411,7 @@ rm -rf $RPM_BUILD_ROOT
* Wed Feb 13 2008 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - 0.31-1.20080212
- updated to CVS snapshot 20080212
- fixed printf regression for '%+04i' style formats
- fixed printf regression for '%%+04i' style formats
- added %%check and run a testsuite; it does not succeed now so it is
for informational purposes only...
- added bunch of patches to fixes big-endian issues in string routines

View file

@ -1,80 +0,0 @@
#! /bin/bash
eval $(grep '^\(TESTPROGRAMS\|SUBDIRS\)=' runtests.sh)
FAILURES_BOGUS=(
":gethostbyname" # network test; net might not be available in test environment
":stdlib:tst-environ" # test uses environ function in unsupported ways (dup keys)
":stdlib:tst-rand48" # platform dependent; does not give reliable results
":stdlib:tst-strtod" # must be investigated further...
":time:tst-mktime" # dietlibc does not support $TZ env
":time:tst-posixtz" # dietlibc does not support $TZ env
":time:tst-strftime" # dietlibc does not support glibc specific format specifications
)
FAILURES_KNOWN=(
":sendfile" # stdin/stdout not supported; test must be wrapped
":stdio:tstdiomisc" # scanf(3) fails on some constructs
":stdio:tst-fphex" # printf(3) does not support %a specifiers
":stdio:tst-printf" # printf(3) does not support some floating point ops
":stdio:tst-sscanf" # scanf(3) fails on double input
":stdlib:test-canon" # realpath(3) is broken...
)
function is_in() {
local val=$1
local i
shift
for i; do
test x"$i" != x"$val" || return 0
done
return 1
}
rc=0
: ${RUNTEST_INDENT=0}
export RUNTEST_INDENT
export RUNTEST_NS
for p in $TESTPROGRAMS; do
! tty -s || printf '%*s%-20s' $RUNTEST_INDENT '' "$p"
is_in "$RUNTEST_NS:$p" "${FAILURES_BOGUS[@]}" && fail_bogus=true || fail_bogus=false
is_in "$RUNTEST_NS:$p" "${FAILURES_KNOWN[@]}" && fail_known=true || fail_known=false
./$p >/dev/null && failed=false || failed=true
case $failed:$fail_known:$fail_bogus in
(false:false:*) res='OK';;
(false:true:true) res='OK (bogus)';;
(false:true:false) res="OK (unexpected)"; let ++rc;;
(true:*:true) res='FAIL (bogus)';;
(true:true:*) res="FAIL (known)";;
(true:false:*) res='FAIL'; let ++rc;;
esac
! tty -s || printf '\r'
printf '%*s%-20s%s\n' $RUNTEST_INDENT '' "$p" "$res"
done
test $rc -eq 0 || \
printf "%*s--> %u tests failed\n" $RUNTEST_INDENT '' $rc
for d in $SUBDIRS; do
echo "--- entering directory $d ---"
let RUNTEST_INDENT+=2
old_ns=$RUNTEST_NS
RUNTEST_NS=$RUNTEST_NS:$d
cd $d && bash ./runtests-X.sh || let ++rc
RUNTEST_NS=$old_ns
let RUNTEST_INDENT-=2
cd $OLDPWD || exit 1
done
test $rc -eq 0 && exit 0 || exit 1

View file

@ -1,2 +1,2 @@
0098761c17924c15e21d25acdda4a8b5 dietlibc-0.32.tar.bz2
f2c6737dc9597558da34deed1246c802 dietlibc-0.32.tar.bz2.sig
SHA512 (dietlibc-0.34.tar.xz) = 2b38528c0ccf50e426f587b6448fed997fab1147eecc9e1af2f3fb3efe3d8f3997656d8e66e7cf1045ceb1f602cef43456c62ba83ff494f9c9816721bdb4d6c6
SHA512 (dietlibc-0.34.tar.xz.sig) = 0428f1a7430b335f527ceb0fb347d50846c25aff38e32ca961f07ca3fc7dc4ca657c09c0797c7bb38b5c126a21e3d6a96f76e6d511e5121bd500276a9ded2a4c

View file

@ -1,2 +1,2 @@
http://www.kernel.org/pub/linux/libs/dietlibc/
dietlibc-(.*?).tar.bz2
http://www.fefe.de/dietlibc/
/dietlibc-(.*?)\.tar\.bz2