2 ===================================================================
3 RCS file: /cvs/dietlibc/dietfeatures.h,v
4 retrieving revision 1.68
5 retrieving revision 1.69
7 --- dietfeatures.h 21 Jun 2010 16:40:06 -0000 1.68
8 +++ dietfeatures.h 1 Aug 2010 19:56:21 -0000 1.69
10 * `main' can not be found. */
11 /* #define WANT_STACKGAP */
13 +/* #define this if you want GNU bloat like program_invocation_short_name
14 + * and program_invocation_name to be there. This functionality is not
15 + * portable and adds useless bloat to libc. Help stomp out code
16 + * depending on this! util-linux, I'm looking at you here! */
17 +#define WANT_GNU_STARTUP_BLOAT
19 /* Include support for ProPolice/SSP, calls guard_setup */
20 /* ProPolice is part of gcc 4.1 and up, there were patches for earlier
21 * versions. To make use of this, compile your application with
22 Index: include/errno.h
23 ===================================================================
24 RCS file: /cvs/dietlibc/include/errno.h,v
25 retrieving revision 1.22
26 retrieving revision 1.23
28 --- include/errno.h 14 May 2005 23:35:39 -0000 1.22
29 +++ include/errno.h 1 Aug 2010 19:56:21 -0000 1.23
31 extern int sys_nerr __attribute_dontuse__;
35 +extern char* program_invocation_name __attribute_dontuse__;
36 +extern char* program_invocation_short_name __attribute_dontuse__;
42 Index: include/stdint.h
43 ===================================================================
44 RCS file: /cvs/dietlibc/include/stdint.h,v
45 retrieving revision 1.8
46 retrieving revision 1.9
48 --- include/stdint.h 15 Mar 2005 08:51:22 -0000 1.8
49 +++ include/stdint.h 1 Aug 2010 19:56:21 -0000 1.9
62 +#define INT8_MIN (-0x80)
63 +#define INT16_MIN (-0x7fff-1)
64 +#define INT32_MIN (-0x7fffffffl-1)
65 +#define INT64_MIN (-0x7fffffffffffffffll-1)
67 +#define INT8_MAX 0x7f
68 +#define INT16_MAX 0x7fff
69 +#define INT32_MAX 0x7fffffffl
70 +#define INT32_MAX 0x7fffffffffffffffll
72 +#define UINT8_MAX 0xff
73 +#define UINT16_MAX 0xffff
74 +#define UINT32_MAX 0xfffffffful
75 +#define UINT64_MAX 0xffffffffffffffffull
78 +#define INTPTR_MIN INT64_MIN
79 +#define INTPTR_MAX INT64_MAX
80 +#define UINTPTR_MAX UINT64_MAX
82 +#define INTPTR_MIN INT32_MIN
83 +#define INTPTR_MAX INT32_MAX
84 +#define UINTPTR_MAX UINT32_MAX
87 +#define SIZE_MAX UINTPTR_MAX
88 +#define PTRDIFF_MIN INTPTR_MIN
89 +#define PTRDIFF_MAX INTPTR_MAX
91 +#define INTMAX_MIN INT64_MIN
92 +#define INTMAX_MAX INT64_MAX
93 +#define UINTMAX_MAX UINT64_MAX
95 #endif /* C++ && limit macros */
98 Index: include/string.h
99 ===================================================================
100 RCS file: /cvs/dietlibc/include/string.h,v
101 retrieving revision 1.53
102 retrieving revision 1.54
103 diff -u -r1.53 -r1.54
104 --- include/string.h 15 May 2009 03:24:27 -0000 1.53
105 +++ include/string.h 1 Aug 2010 19:56:21 -0000 1.54
107 int strerror_r(int errnum,char* buf,size_t n) __THROW __attribute_dontuse__;
110 -const char *strsignal(int signum) __THROW __attribute_const__;
111 +char *strsignal(int signum) __THROW __attribute_const__;
112 void *memmem(const void *haystack, size_t haystacklen, const void *needle, size_t needlelen) __THROW __nonnull((1,3));
114 void* mempcpy(void* __restrict__ dest,const void* __restrict__ src,size_t n) __THROW __nonnull((1,2));
115 Index: lib/stackgap.c
116 ===================================================================
117 RCS file: /cvs/dietlibc/lib/stackgap.c,v
118 retrieving revision 1.15
119 retrieving revision 1.16
120 diff -u -r1.15 -r1.16
121 --- lib/stackgap.c 2 Jun 2010 20:22:07 -0000 1.15
122 +++ lib/stackgap.c 1 Aug 2010 19:56:21 -0000 1.16
125 #include "dietfeatures.h"
127 +#ifdef WANT_GNU_STARTUP_BLOAT
128 +char* program_invocation_name;
129 +char* program_invocation_short_name;
132 extern int main(int argc,char* argv[],char* envp[]);
134 #if defined(WANT_SSP)
136 __valgrind=(v && strstr(v,"valgrind"));
139 +#ifdef WANT_GNU_STARTUP_BLOAT
140 + program_invocation_name=argv[0];
143 + for (c=program_invocation_short_name=program_invocation_name; *c; ++c)
144 + if (*c=='/') program_invocation_short_name=c+1;
147 return main(argc,argv,envp);
150 Index: libugly/strsignal.c
151 ===================================================================
152 RCS file: /cvs/dietlibc/libugly/strsignal.c,v
153 retrieving revision 1.9
154 retrieving revision 1.10
156 --- libugly/strsignal.c 15 Aug 2006 16:07:15 -0000 1.9
157 +++ libugly/strsignal.c 1 Aug 2010 19:56:21 -0000 1.10
162 -const char* strsignal(int sig) {
163 +char* strsignal(int sig) {
164 if ((unsigned int)sig<=SIGRTMAX)
165 - return sys_siglist[sig];
166 + return (char*)sys_siglist[sig];
168 - return "(unknown signal)";
169 + return (char*)"(unknown signal)";