Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 76082 | Differences between
and this patch

Collapse All | Expand All

(-)udev-039.orig/klibc/include/features.h (+322 lines)
Line 0 Link Here
1
/* Copyright (C) 1991-1993,1995-2003, 2004 Free Software Foundation, Inc.
2
   This file is part of the GNU C Library.
3
4
   The GNU C Library is free software; you can redistribute it and/or
5
   modify it under the terms of the GNU Lesser General Public
6
   License as published by the Free Software Foundation; either
7
   version 2.1 of the License, or (at your option) any later version.
8
9
   The GNU C Library is distributed in the hope that it will be useful,
10
   but WITHOUT ANY WARRANTY; without even the implied warranty of
11
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
   Lesser General Public License for more details.
13
14
   You should have received a copy of the GNU Lesser General Public
15
   License along with the GNU C Library; if not, write to the Free
16
   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17
   02111-1307 USA.  */
18
19
#ifndef	_FEATURES_H
20
#define	_FEATURES_H	1
21
22
/* These are defined by the user (or the compiler)
23
   to specify the desired environment:
24
25
   __STRICT_ANSI__	ISO Standard C.
26
   _ISOC99_SOURCE	Extensions to ISO C89 from ISO C99.
27
   _POSIX_SOURCE	IEEE Std 1003.1.
28
   _POSIX_C_SOURCE	If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
29
			if >=199309L, add IEEE Std 1003.1b-1993;
30
			if >=199506L, add IEEE Std 1003.1c-1995;
31
			if >=200112L, all of IEEE 1003.1-2004
32
   _XOPEN_SOURCE	Includes POSIX and XPG things.  Set to 500 if
33
			Single Unix conformance is wanted, to 600 for the
34
			upcoming sixth revision.
35
   _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
36
   _LARGEFILE_SOURCE	Some more functions for correct standard I/O.
37
   _LARGEFILE64_SOURCE	Additional functionality from LFS for large files.
38
   _FILE_OFFSET_BITS=N	Select default filesystem interface.
39
   _BSD_SOURCE		ISO C, POSIX, and 4.3BSD things.
40
   _SVID_SOURCE		ISO C, POSIX, and SVID things.
41
   _GNU_SOURCE		All of the above, plus GNU extensions.
42
   _REENTRANT		Select additionally reentrant object.
43
   _THREAD_SAFE		Same as _REENTRANT, often used by other systems.
44
45
   The `-ansi' switch to the GNU C compiler defines __STRICT_ANSI__.
46
   If none of these are defined, the default is to have _SVID_SOURCE,
47
   _BSD_SOURCE, and _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
48
   199506L.  If more than one of these are defined, they accumulate.
49
   For example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE
50
   together give you ISO C, 1003.1, and 1003.2, but nothing else.
51
52
   These are defined by this file and are used by the
53
   header files to decide what to declare or define:
54
55
   __USE_ISOC99		Define ISO C99 things.
56
   __USE_POSIX		Define IEEE Std 1003.1 things.
57
   __USE_POSIX2		Define IEEE Std 1003.2 things.
58
   __USE_POSIX199309	Define IEEE Std 1003.1, and .1b things.
59
   __USE_POSIX199506	Define IEEE Std 1003.1, .1b, .1c and .1i things.
60
   __USE_XOPEN		Define XPG things.
61
   __USE_XOPEN_EXTENDED	Define X/Open Unix things.
62
   __USE_UNIX98		Define Single Unix V2 things.
63
   __USE_XOPEN2K        Define XPG6 things.
64
   __USE_LARGEFILE	Define correct standard I/O things.
65
   __USE_LARGEFILE64	Define LFS things with separate names.
66
   __USE_FILE_OFFSET64	Define 64bit interface as default.
67
   __USE_BSD		Define 4.3BSD things.
68
   __USE_SVID		Define SVID things.
69
   __USE_MISC		Define things common to BSD and System V Unix.
70
   __USE_GNU		Define GNU extensions.
71
   __USE_REENTRANT	Define reentrant/thread-safe *_r functions.
72
   __FAVOR_BSD		Favor 4.3BSD things in cases of conflict.
73
74
   The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
75
   defined by this file unconditionally.  `__GNU_LIBRARY__' is provided
76
   only for compatibility.  All new code should use the other symbols
77
   to test for features.
78
79
   All macros listed above as possibly being defined by this file are
80
   explicitly undefined if they are not explicitly defined.
81
   Feature-test macros that are not defined by the user or compiler
82
   but are implied by the other feature-test macros defined (or by the
83
   lack of any definitions) are defined by the file.  */
84
85
86
/* Undefine everything, so we get a clean slate.  */
87
#undef	__USE_ISOC99
88
#undef	__USE_POSIX
89
#undef	__USE_POSIX2
90
#undef	__USE_POSIX199309
91
#undef	__USE_POSIX199506
92
#undef	__USE_XOPEN
93
#undef	__USE_XOPEN_EXTENDED
94
#undef	__USE_UNIX98
95
#undef	__USE_XOPEN2K
96
#undef	__USE_LARGEFILE
97
#undef	__USE_LARGEFILE64
98
#undef	__USE_FILE_OFFSET64
99
#undef	__USE_BSD
100
#undef	__USE_SVID
101
#undef	__USE_MISC
102
#undef	__USE_GNU
103
#undef	__USE_REENTRANT
104
#undef	__FAVOR_BSD
105
#undef	__KERNEL_STRICT_NAMES
106
107
/* Suppress kernel-name space pollution unless user expressedly asks
108
   for it.  */
109
#ifndef _LOOSE_KERNEL_NAMES
110
# define __KERNEL_STRICT_NAMES
111
#endif
112
113
/* Always use ISO C things.  */
114
#define	__USE_ANSI	1
115
116
117
/* If _BSD_SOURCE was defined by the user, favor BSD over POSIX.  */
118
#if defined _BSD_SOURCE && \
119
    !(defined _POSIX_SOURCE || defined _POSIX_C_SOURCE || \
120
      defined _XOPEN_SOURCE || defined _XOPEN_SOURCE_EXTENDED || \
121
      defined _GNU_SOURCE || defined _SVID_SOURCE)
122
# define __FAVOR_BSD	1
123
#endif
124
125
/* If _GNU_SOURCE was defined by the user, turn on all the other features.  */
126
#ifdef _GNU_SOURCE
127
# undef  _ISOC99_SOURCE
128
# define _ISOC99_SOURCE	1
129
# undef  _POSIX_SOURCE
130
# define _POSIX_SOURCE	1
131
# undef  _POSIX_C_SOURCE
132
# define _POSIX_C_SOURCE	199506L
133
# undef  _XOPEN_SOURCE
134
# define _XOPEN_SOURCE	600
135
# undef  _XOPEN_SOURCE_EXTENDED
136
# define _XOPEN_SOURCE_EXTENDED	1
137
# undef	 _LARGEFILE64_SOURCE
138
# define _LARGEFILE64_SOURCE	1
139
# undef  _BSD_SOURCE
140
# define _BSD_SOURCE	1
141
# undef  _SVID_SOURCE
142
# define _SVID_SOURCE	1
143
#endif
144
145
/* If nothing (other than _GNU_SOURCE) is defined,
146
   define _BSD_SOURCE and _SVID_SOURCE.  */
147
#if (!defined __STRICT_ANSI__ && !defined _ISOC99_SOURCE && \
148
     !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE && \
149
     !defined _XOPEN_SOURCE && !defined _XOPEN_SOURCE_EXTENDED && \
150
     !defined _BSD_SOURCE && !defined _SVID_SOURCE)
151
# define _BSD_SOURCE	1
152
# define _SVID_SOURCE	1
153
#endif
154
155
/* This is to enable the ISO C99 extension.  Also recognize the old macro
156
   which was used prior to the standard acceptance.  This macro will
157
   eventually go away and the features enabled by default once the ISO C99
158
   standard is widely adopted.  */
159
#if (defined _ISOC99_SOURCE || defined _ISOC9X_SOURCE \
160
     || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))
161
# define __USE_ISOC99	1
162
#endif
163
164
/* If none of the ANSI/POSIX macros are defined, use POSIX.1 and POSIX.2
165
   (and IEEE Std 1003.1b-1993 unless _XOPEN_SOURCE is defined).  */
166
#if (!defined __STRICT_ANSI__ && !defined _POSIX_SOURCE && \
167
     !defined _POSIX_C_SOURCE)
168
# define _POSIX_SOURCE	1
169
# if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 500
170
#  define _POSIX_C_SOURCE	2
171
# else
172
#  define _POSIX_C_SOURCE	199506L
173
# endif
174
#endif
175
176
#if defined _POSIX_SOURCE || _POSIX_C_SOURCE >= 1 || defined _XOPEN_SOURCE
177
# define __USE_POSIX	1
178
#endif
179
180
#if defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 2 || defined _XOPEN_SOURCE
181
# define __USE_POSIX2	1
182
#endif
183
184
#if (_POSIX_C_SOURCE - 0) >= 199309L
185
# define __USE_POSIX199309	1
186
#endif
187
188
#if (_POSIX_C_SOURCE - 0) >= 199506L
189
# define __USE_POSIX199506	1
190
#endif
191
192
#if (_POSIX_C_SOURCE - 0) >= 200112L
193
# define __USE_XOPEN2K		1
194
#endif
195
196
#ifdef	_XOPEN_SOURCE
197
# define __USE_XOPEN	1
198
# if (_XOPEN_SOURCE - 0) >= 500
199
#  define __USE_XOPEN_EXTENDED	1
200
#  define __USE_UNIX98	1
201
#  undef _LARGEFILE_SOURCE
202
#  define _LARGEFILE_SOURCE	1
203
#  if (_XOPEN_SOURCE - 0) >= 600
204
#   define __USE_XOPEN2K	1
205
#   undef __USE_ISOC99
206
#   define __USE_ISOC99		1
207
#  endif
208
# else
209
#  ifdef _XOPEN_SOURCE_EXTENDED
210
#   define __USE_XOPEN_EXTENDED	1
211
#  endif
212
# endif
213
#endif
214
215
#ifdef _LARGEFILE_SOURCE
216
# define __USE_LARGEFILE	1
217
#endif
218
219
#ifdef _LARGEFILE64_SOURCE
220
# define __USE_LARGEFILE64	1
221
#endif
222
223
#if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64
224
# define __USE_FILE_OFFSET64	1
225
#endif
226
227
#if defined _BSD_SOURCE || defined _SVID_SOURCE
228
# define __USE_MISC	1
229
#endif
230
231
#ifdef	_BSD_SOURCE
232
# define __USE_BSD	1
233
#endif
234
235
#ifdef	_SVID_SOURCE
236
# define __USE_SVID	1
237
#endif
238
239
#ifdef	_GNU_SOURCE
240
# define __USE_GNU	1
241
#endif
242
243
#if defined _REENTRANT || defined _THREAD_SAFE
244
# define __USE_REENTRANT	1
245
#endif
246
247
/* We do support the IEC 559 math functionality, real and complex.  */
248
#define __STDC_IEC_559__		1
249
#define __STDC_IEC_559_COMPLEX__	1
250
251
/* wchar_t uses ISO 10646-1 (2nd ed., published 2000-09-15) / Unicode 3.1.  */
252
#define __STDC_ISO_10646__		200009L
253
254
/* This macro indicates that the installed library is the GNU C Library.
255
   For historic reasons the value now is 6 and this will stay from now
256
   on.  The use of this variable is deprecated.  Use __GLIBC__ and
257
   __GLIBC_MINOR__ now (see below) when you want to test for a specific
258
   GNU C library version and use the values in <gnu/lib-names.h> to get
259
   the sonames of the shared libraries.  */
260
#undef  __GNU_LIBRARY__
261
#define __GNU_LIBRARY__ 6
262
263
/* Major and minor version number of the GNU C library package.  Use
264
   these macros to test for features in specific releases.  */
265
#define	__GLIBC__	2
266
#define	__GLIBC_MINOR__	3
267
268
/* Convenience macros to test the versions of glibc and gcc.
269
   Use them like this:
270
   #if __GNUC_PREREQ (2,8)
271
   ... code requiring gcc 2.8 or later ...
272
   #endif
273
   Note - they won't work for gcc1 or glibc1, since the _MINOR macros
274
   were not defined then.  */
275
#if defined __GNUC__ && defined __GNUC_MINOR__
276
# define __GNUC_PREREQ(maj, min) \
277
	((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
278
#else
279
# define __GNUC_PREREQ(maj, min) 0
280
#endif
281
282
#define __GLIBC_PREREQ(maj, min) \
283
	((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
284
285
/* Decide whether a compiler supports the long long datatypes.  */
286
#if defined __GNUC__ \
287
    || (defined __PGI && defined __i386__ ) \
288
    || (defined __INTEL_COMPILER && (defined __i386__ || defined __ia64__)) \
289
    || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
290
# define __GLIBC_HAVE_LONG_LONG	1
291
#endif
292
293
/* This is here only because every header file already includes this one.  */
294
#ifndef __ASSEMBLER__
295
# ifndef _SYS_CDEFS_H
296
#  include <sys/cdefs.h>
297
# endif
298
299
/* If we don't have __REDIRECT, prototypes will be missing if
300
   __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. */
301
# if defined __USE_FILE_OFFSET64 && !defined __REDIRECT
302
#  define __USE_LARGEFILE	1
303
#  define __USE_LARGEFILE64	1
304
# endif
305
306
#endif	/* !ASSEMBLER */
307
308
/* Decide whether we can define 'extern inline' functions in headers.  */
309
#if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ \
310
    && !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__
311
# define __USE_EXTERN_INLINES	1
312
#endif
313
314
315
/* This is here only because every header file already includes this one.
316
   Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
317
   <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
318
   that will always return failure (and set errno to ENOSYS).  */
319
#include <gnu/stubs.h>
320
321
322
#endif	/* features.h  */
(-)udev-039.orig/klibc/include/gnu/stubs.h (+30 lines)
Line 0 Link Here
1
/* This file is automatically generated.
2
   It defines a symbol `__stub_FUNCTION' for each function
3
   in the C library which is a stub, meaning it will fail
4
   every time called, usually setting errno to ENOSYS.  */
5
6
#ifdef _LIBC
7
 #error Applications may not define the macro _LIBC
8
#endif
9
10
#define __stub___kernel_cosl
11
#define __stub___kernel_sinl
12
#define __stub___kernel_tanl
13
#define __stub_chflags
14
#define __stub_epoll_create
15
#define __stub_epoll_ctl
16
#define __stub_epoll_wait
17
#define __stub_fattach
18
#define __stub_fchflags
19
#define __stub_fdetach
20
#define __stub_gtty
21
#define __stub_lchmod
22
#define __stub_lutimes
23
#define __stub_mq_setattr
24
#define __stub_mq_timedreceive
25
#define __stub_mq_timedsend
26
#define __stub_remap_file_pages
27
#define __stub_revoke
28
#define __stub_setlogin
29
#define __stub_sstk
30
#define __stub_stty
(-)udev-039.orig/klibc/include/sys/cdefs.h (+260 lines)
Line 0 Link Here
1
/* Copyright (C) 1992-2001, 2002 Free Software Foundation, Inc.
2
   This file is part of the GNU C Library.
3
4
   The GNU C Library is free software; you can redistribute it and/or
5
   modify it under the terms of the GNU Lesser General Public
6
   License as published by the Free Software Foundation; either
7
   version 2.1 of the License, or (at your option) any later version.
8
9
   The GNU C Library is distributed in the hope that it will be useful,
10
   but WITHOUT ANY WARRANTY; without even the implied warranty of
11
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
   Lesser General Public License for more details.
13
14
   You should have received a copy of the GNU Lesser General Public
15
   License along with the GNU C Library; if not, write to the Free
16
   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17
   02111-1307 USA.  */
18
19
#ifndef	_SYS_CDEFS_H
20
#define	_SYS_CDEFS_H	1
21
22
/* We are almost always included from features.h. */
23
#ifndef _FEATURES_H
24
# include <features.h>
25
#endif
26
27
/* The GNU libc does not support any K&R compilers or the traditional mode
28
   of ISO C compilers anymore.  Check for some of the combinations not
29
   anymore supported.  */
30
#if defined __GNUC__ && !defined __STDC__
31
# error "You need a ISO C conforming compiler to use the glibc headers"
32
#endif
33
34
/* Some user header file might have defined this before.  */
35
#undef	__P
36
#undef	__PMT
37
38
#ifdef __GNUC__
39
40
/* GCC can always grok prototypes.  For C++ programs we add throw()
41
   to help it optimize the function calls.  But this works only with
42
   gcc 2.8.x and egcs.  */
43
# if defined __cplusplus && __GNUC_PREREQ (2,8)
44
#  define __THROW	throw ()
45
# else
46
#  define __THROW
47
# endif
48
# define __P(args)	args __THROW
49
/* This macro will be used for functions which might take C++ callback
50
   functions.  */
51
# define __PMT(args)	args
52
53
#else	/* Not GCC.  */
54
55
# define __inline		/* No inline functions.  */
56
57
# define __THROW
58
# define __P(args)	args
59
# define __PMT(args)	args
60
61
# define __const	const
62
# define __signed	signed
63
# define __volatile	volatile
64
65
#endif	/* GCC.  */
66
67
/* For these things, GCC behaves the ANSI way normally,
68
   and the non-ANSI way under -traditional.  */
69
70
#define __CONCAT(x,y)	x ## y
71
#define __STRING(x)	#x
72
73
/* This is not a typedef so `const __ptr_t' does the right thing.  */
74
#define __ptr_t void *
75
#define __long_double_t  long double
76
77
78
/* C++ needs to know that types and declarations are C, not C++.  */
79
#ifdef	__cplusplus
80
# define __BEGIN_DECLS	extern "C" {
81
# define __END_DECLS	}
82
#else
83
# define __BEGIN_DECLS
84
# define __END_DECLS
85
#endif
86
87
88
/* The standard library needs the functions from the ISO C90 standard
89
   in the std namespace.  At the same time we want to be safe for
90
   future changes and we include the ISO C99 code in the non-standard
91
   namespace __c99.  The C++ wrapper header take case of adding the
92
   definitions to the global namespace.  */
93
#if defined __cplusplus && defined _GLIBCPP_USE_NAMESPACES
94
# define __BEGIN_NAMESPACE_STD	namespace std {
95
# define __END_NAMESPACE_STD	}
96
# define __USING_NAMESPACE_STD(name) using std::name;
97
# define __BEGIN_NAMESPACE_C99	namespace __c99 {
98
# define __END_NAMESPACE_C99	}
99
# define __USING_NAMESPACE_C99(name) using __c99::name;
100
#else
101
/* For compatibility we do not add the declarations into any
102
   namespace.  They will end up in the global namespace which is what
103
   old code expects.  */
104
# define __BEGIN_NAMESPACE_STD
105
# define __END_NAMESPACE_STD
106
# define __USING_NAMESPACE_STD(name)
107
# define __BEGIN_NAMESPACE_C99
108
# define __END_NAMESPACE_C99
109
# define __USING_NAMESPACE_C99(name)
110
#endif
111
112
113
/* Support for bounded pointers.  */
114
#ifndef __BOUNDED_POINTERS__
115
# define __bounded	/* nothing */
116
# define __unbounded	/* nothing */
117
# define __ptrvalue	/* nothing */
118
#endif
119
120
121
/* Support for flexible arrays.  */
122
#if __GNUC_PREREQ (2,97)
123
/* GCC 2.97 supports C99 flexible array members.  */
124
# define __flexarr	[]
125
#else
126
# ifdef __GNUC__
127
#  define __flexarr	[0]
128
# else
129
#  if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
130
#   define __flexarr	[]
131
#  else
132
/* Some other non-C99 compiler.  Approximate with [1].  */
133
#   define __flexarr	[1]
134
#  endif
135
# endif
136
#endif
137
138
139
/* __asm__ ("xyz") is used throughout the headers to rename functions
140
   at the assembly language level.  This is wrapped by the __REDIRECT
141
   macro, in order to support compilers that can do this some other
142
   way.  When compilers don't support asm-names at all, we have to do
143
   preprocessor tricks instead (which don't have exactly the right
144
   semantics, but it's the best we can do).
145
146
   Example:
147
   int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); */
148
149
#if defined __GNUC__ && __GNUC__ >= 2
150
151
# define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias))
152
# define __ASMNAME(cname)  __ASMNAME2 (__USER_LABEL_PREFIX__, cname)
153
# define __ASMNAME2(prefix, cname) __STRING (prefix) cname
154
155
/*
156
#elif __SOME_OTHER_COMPILER__
157
158
# define __REDIRECT(name, proto, alias) name proto; \
159
	_Pragma("let " #name " = " #alias)
160
*/
161
#endif
162
163
/* GCC has various useful declarations that can be made with the
164
   `__attribute__' syntax.  All of the ways we use this do fine if
165
   they are omitted for compilers that don't understand it. */
166
#if !defined __GNUC__ || __GNUC__ < 2
167
# define __attribute__(xyz)	/* Ignore */
168
#endif
169
170
/* At some point during the gcc 2.96 development the `malloc' attribute
171
   for functions was introduced.  We don't want to use it unconditionally
172
   (although this would be possible) since it generates warnings.  */
173
#if __GNUC_PREREQ (2,96)
174
# define __attribute_malloc__ __attribute__ ((__malloc__))
175
#else
176
# define __attribute_malloc__ /* Ignore */
177
#endif
178
179
/* At some point during the gcc 2.96 development the `pure' attribute
180
   for functions was introduced.  We don't want to use it unconditionally
181
   (although this would be possible) since it generates warnings.  */
182
#if __GNUC_PREREQ (2,96)
183
# define __attribute_pure__ __attribute__ ((__pure__))
184
#else
185
# define __attribute_pure__ /* Ignore */
186
#endif
187
188
/* At some point during the gcc 3.1 development the `used' attribute
189
   for functions was introduced.  We don't want to use it unconditionally
190
   (although this would be possible) since it generates warnings.  */
191
#if __GNUC_PREREQ (3,1)
192
# define __attribute_used__ __attribute__ ((__used__))
193
# define __attribute_noinline__ __attribute__ ((__noinline__))
194
#else
195
# define __attribute_used__ __attribute__ ((__unused__))
196
# define __attribute_noinline__ /* Ignore */
197
#endif
198
199
/* gcc allows marking deprecated functions.  */
200
#if __GNUC_PREREQ (3,2)
201
# define __attribute_deprecated__ __attribute__ ((__deprecated__))
202
#else
203
# define __attribute_deprecated__ /* Ignore */
204
#endif
205
206
/* At some point during the gcc 2.8 development the `format_arg' attribute
207
   for functions was introduced.  We don't want to use it unconditionally
208
   (although this would be possible) since it generates warnings.
209
   If several `format_arg' attributes are given for the same function, in
210
   gcc-3.0 and older, all but the last one are ignored.  In newer gccs,
211
   all designated arguments are considered.  */
212
#if __GNUC_PREREQ (2,8)
213
# define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x)))
214
#else
215
# define __attribute_format_arg__(x) /* Ignore */
216
#endif
217
218
/* At some point during the gcc 2.97 development the `strfmon' format
219
   attribute for functions was introduced.  We don't want to use it
220
   unconditionally (although this would be possible) since it
221
   generates warnings.  */
222
#if __GNUC_PREREQ (2,97)
223
# define __attribute_format_strfmon__(a,b) \
224
  __attribute__ ((__format__ (__strfmon__, a, b)))
225
#else
226
# define __attribute_format_strfmon__(a,b) /* Ignore */
227
#endif
228
229
/* It is possible to compile containing GCC extensions even if GCC is
230
   run in pedantic mode if the uses are carefully marked using the
231
   `__extension__' keyword.  But this is not generally available before
232
   version 2.8.  */
233
#if !__GNUC_PREREQ (2,8)
234
# define __extension__		/* Ignore */
235
#endif
236
237
/* __restrict is known in EGCS 1.2 and above. */
238
#if !__GNUC_PREREQ (2,92)
239
# define __restrict	/* Ignore */
240
#endif
241
242
/* ISO C99 also allows to declare arrays as non-overlapping.  The syntax is
243
     array_name[restrict]
244
   GCC 3.1 supports this.  */
245
#if __GNUC_PREREQ (3,1) && !defined __GNUG__
246
# define __restrict_arr	__restrict
247
#else
248
# ifdef __GNUC__
249
#  define __restrict_arr	/* Not supported in old GCC.  */
250
# else
251
#  if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
252
#   define __restrict_arr	restrict
253
#  else
254
/* Some other non-C99 compiler.  */
255
#   define __restrict_arr	/* Not supported.  */
256
#  endif
257
# endif
258
#endif
259
260
#endif	 /* sys/cdefs.h */
(-)udev-039.orig/klibc/include/sys/sysctl.h (+72 lines)
Line 0 Link Here
1
/* Copyright (C) 1996, 1999, 2002, 2003, 2004 Free Software Foundation, Inc.
2
   This file is part of the GNU C Library.
3
4
   The GNU C Library is free software; you can redistribute it and/or
5
   modify it under the terms of the GNU Lesser General Public
6
   License as published by the Free Software Foundation; either
7
   version 2.1 of the License, or (at your option) any later version.
8
9
   The GNU C Library is distributed in the hope that it will be useful,
10
   but WITHOUT ANY WARRANTY; without even the implied warranty of
11
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
   Lesser General Public License for more details.
13
14
   You should have received a copy of the GNU Lesser General Public
15
   License along with the GNU C Library; if not, write to the Free
16
   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17
   02111-1307 USA.  */
18
19
#ifndef	_SYS_SYSCTL_H
20
#define	_SYS_SYSCTL_H	1
21
22
#include <features.h>
23
#define __need_size_t
24
#include <stddef.h>
25
/* Prevent more kernel headers than necessary to be included.  */
26
#ifndef _LINUX_KERNEL_H
27
# define _LINUX_KERNEL_H	1
28
# define __undef_LINUX_KERNEL_H
29
#endif
30
#ifndef _LINUX_TYPES_H
31
# define _LINUX_TYPES_H		1
32
# define __undef_LINUX_TYPES_H
33
#endif
34
#ifndef _LINUX_LIST_H
35
# define _LINUX_LIST_H		1
36
# define __undef_LINUX_LIST_H
37
#endif
38
#ifndef __LINUX_COMPILER_H
39
# define __LINUX_COMPILER_H	1
40
# define __user
41
# define __undef__LINUX_COMPILER_H
42
#endif
43
44
#include <linux/sysctl.h>
45
46
#ifdef __undef_LINUX_KERNEL_H
47
# undef _LINUX_KERNEL_H
48
# undef __undef_LINUX_KERNEL_H
49
#endif
50
#ifdef __undef_LINUX_TYPES_H
51
# undef _LINUX_TYPES_H
52
# undef __undef_LINUX_TYPES_H
53
#endif
54
#ifdef __undef_LINUX_LIST_H
55
# undef _LINUX_LIST_H
56
# undef __undef_LINUX_LIST_H
57
#endif
58
#ifdef __undef__LINUX_COMPILER_H
59
# undef __LINUX_COMPILER_H
60
# undef __user
61
# undef __undef__LINUX_COMPILER_H
62
#endif
63
64
__BEGIN_DECLS
65
66
/* Read or write system parameters.  */
67
extern int sysctl (int *__name, int __nlen, void *__oldval,
68
		   size_t *__oldlenp, void *__newval, size_t __newlen) __THROW;
69
70
__END_DECLS
71
72
#endif	/* _SYS_SYSCTL_H */
(-)udev-039.orig/klibc/klibc/Makefile (-1 / +1 lines)
Lines 46-52 Link Here
46
	  lrand48.o jrand48.o mrand48.o nrand48.o srand48.o seed48.o \
46
	  lrand48.o jrand48.o mrand48.o nrand48.o srand48.o seed48.o \
47
	  inet/inet_ntoa.o inet/inet_aton.o inet/inet_addr.o \
47
	  inet/inet_ntoa.o inet/inet_aton.o inet/inet_addr.o \
48
	  inet/inet_ntop.o inet/inet_pton.o inet/bindresvport.o \
48
	  inet/inet_ntop.o inet/inet_pton.o inet/bindresvport.o \
49
	  send.o recv.o
49
	  send.o recv.o ssp.o
50
ifeq ($(ERRLIST),1)
50
ifeq ($(ERRLIST),1)
51
LIBOBJS += errlist.o
51
LIBOBJS += errlist.o
52
endif
52
endif
(-)udev-039.orig/klibc/klibc/ssp.c (+16 lines)
Line 0 Link Here
1
#include <syslog.h>
2
#include <stdlib.h>
3
#include <sys/param.h>
4
#include <sys/sysctl.h>
5
6
unsigned long __guard = 0UL; static void __guard_setup(void) __attribute__ ((constructor));
7
void __stack_smash_handler(char func[], int damaged __attribute__ ((unused)));
8
static void __guard_setup(void) { if (__guard != 0UL) return; __guard = 0xFF0A0D00UL; }
9
10
void __stack_smash_handler(char func[], int damaged) { 
11
	syslog(LOG_CRIT, "stack overflow in function %s(); %s=%p __guard_setup=%p __guard=%p " \
12
		"PPID=%d PID=%d UID=%d EUID=%d GID=%d EGID=%d", 
13
		func, func, __guard_setup, __guard,
14
		getppid(), getpid(), getuid(), geteuid(), getgid(), getegid());
15
	_exit(127);
16
}

Return to bug 76082