summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/elf.h30
-rw-r--r--include/errno.h13
-rw-r--r--include/signal.h2
-rw-r--r--include/sys/cdefs.h78
-rw-r--r--include/sys/sysmacros.h20
5 files changed, 111 insertions, 32 deletions
diff --git a/include/elf.h b/include/elf.h
index 11f82ba50..e00969266 100644
--- a/include/elf.h
+++ b/include/elf.h
@@ -920,23 +920,25 @@ typedef struct
typedef struct
{
- int a_type; /* Entry type */
+ uint32_t a_type; /* Entry type */
union
{
- long int a_val; /* Integer value */
- void *a_ptr; /* Pointer value */
- void (*a_fcn) (void); /* Function pointer value */
+ uint32_t a_val; /* Integer value */
+ /* We use to have pointer elements added here. We cannot do that,
+ though, since it does not work when using 32-bit definitions
+ on 64-bit platforms and vice versa. */
} a_un;
} Elf32_auxv_t;
typedef struct
{
- long int a_type; /* Entry type */
+ uint64_t a_type; /* Entry type */
union
{
- long int a_val; /* Integer value */
- void *a_ptr; /* Pointer value */
- void (*a_fcn) (void); /* Function pointer value */
+ uint64_t a_val; /* Integer value */
+ /* We use to have pointer elements added here. We cannot do that,
+ though, since it does not work when using 32-bit definitions
+ on 64-bit platforms and vice versa. */
} a_un;
} Elf64_auxv_t;
@@ -1907,6 +1909,9 @@ typedef Elf32_Addr Elf32_Conflict;
#define LITUSE_ALPHA_TLS_GD 4
#define LITUSE_ALPHA_TLS_LDM 5
+/* Legal values for d_tag of Elf64_Dyn. */
+#define DT_ALPHA_PLTRO 0x70000000
+#define DT_ALPHA_NUM 1
/* PowerPC specific declarations */
@@ -2017,10 +2022,19 @@ typedef Elf32_Addr Elf32_Conflict;
#define R_PPC_DIAB_RELSDA_HI 184 /* like EMB_RELSDA, but high 16 bit */
#define R_PPC_DIAB_RELSDA_HA 185 /* like EMB_RELSDA, adjusted high 16 */
+/* GNU relocs used in PIC code sequences. */
+#define R_PPC_REL16 249 /* word32 (sym-.) */
+#define R_PPC_REL16_LO 250 /* half16 (sym-.)@l */
+#define R_PPC_REL16_HI 251 /* half16 (sym-.)@h */
+#define R_PPC_REL16_HA 252 /* half16 (sym-.)@ha */
+
/* This is a phony reloc to handle any old fashioned TOC16 references
that may still be in object files. */
#define R_PPC_TOC16 255
+/* PowerPC specific values for the Dyn d_tag field. */
+#define DT_PPC_GOT (DT_LOPROC + 0)
+#define DT_PPC_NUM 1
/* PowerPC64 relocations defined by the ABIs */
#define R_PPC64_NONE R_PPC_NONE
diff --git a/include/errno.h b/include/errno.h
index 8c7f666fe..390e51521 100644
--- a/include/errno.h
+++ b/include/errno.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,93,94,95,96,97,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,8 +25,8 @@
/* The includer defined __need_Emath if he wants only the definitions
of EDOM and ERANGE, and not everything else. */
#ifndef __need_Emath
-#define _ERRNO_H 1
-#include <features.h>
+# define _ERRNO_H 1
+# include <features.h>
#endif
__BEGIN_DECLS
@@ -47,6 +47,13 @@ __BEGIN_DECLS
extern int errno;
#endif
+#if 0 /*def __USE_GNU uClibc note: not supported */
+
+/* The full and simple forms of the name with which the program was
+ invoked. These variables are set up automatically at startup based on
+ the value of ARGV[0] (this works only if you use GNU ld). */
+extern char *program_invocation_name, *program_invocation_short_name;
+#endif /* __USE_GNU */
#endif /* _ERRNO_H */
__END_DECLS
diff --git a/include/signal.h b/include/signal.h
index 7793cdbe1..c22b4372c 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -276,7 +276,7 @@ extern int sigqueue (__pid_t __pid, int __sig, __const union sigval __val)
#ifdef __UCLIBC_HAS_SYS_SIGLIST__
/* Names of the signals. This variable exists only for compatibility.
Use `strsignal' instead (see <string.h>). */
-extern __const char *__const _sys_siglist[_NSIG];
+#define _sys_siglist sys_siglist
extern __const char *__const sys_siglist[_NSIG];
#endif /* __UCLIBC_HAS_SYS_SIGLIST__ */
diff --git a/include/sys/cdefs.h b/include/sys/cdefs.h
index f370145f1..0a6d345bc 100644
--- a/include/sys/cdefs.h
+++ b/include/sys/cdefs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2001, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2001, 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -39,24 +39,28 @@
/* GCC can always grok prototypes. For C++ programs we add throw()
to help it optimize the function calls. But this works only with
- gcc 2.8.x and egcs. */
-# if defined __cplusplus && __GNUC_PREREQ (2,8)
-# define __THROW throw ()
+ gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+ as non-throwing using a function attribute since programs can use
+ the -fexceptions options for C code as well. */
+# if 0 //!defined __cplusplus && __GNUC_PREREQ (3, 3)
+# define __THROW __attribute__ ((__nothrow__))
+# define __NTH(fct) __attribute__ ((__nothrow__)) fct
# else
-# define __THROW
+# if defined __cplusplus && __GNUC_PREREQ (2,8)
+# define __THROW throw ()
+# define __NTH(fct) fct throw ()
+# else
+# define __THROW
+# define __NTH(fct) fct
+# endif
# endif
-# define __P(args) args __THROW
-/* This macro will be used for functions which might take C++ callback
- functions. */
-# define __PMT(args) args
#else /* Not GCC. */
# define __inline /* No inline functions. */
# define __THROW
-# define __P(args) args
-# define __PMT(args) args
+# define __NTH(fct) fct
# define __const const
# define __signed signed
@@ -64,6 +68,11 @@
#endif /* GCC. */
+/* These two macros are not used in glibc anymore. They are kept here
+ only because some other projects expect the macros to be defined. */
+#define __P(args) args
+#define __PMT(args) args
+
/* For these things, GCC behaves the ANSI way normally,
and the non-ANSI way under -traditional. */
@@ -118,6 +127,12 @@
#endif
+/* Fortify support. */
+#define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
+#define __bos0(ptr) __builtin_object_size (ptr, 0)
+#define __warndecl(name, msg) extern void name (void)
+
+
/* Support for flexible arrays. */
#if __GNUC_PREREQ (2,97)
/* GCC 2.97 supports C99 flexible array members. */
@@ -150,6 +165,17 @@
# define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias))
# define __ASMNAME(cname) __C_SYMBOL_PREFIX__ cname
+/*
+# ifdef __cplusplus
+# define __REDIRECT_NTH(name, proto, alias) \
+ name proto __THROW __asm__ (__ASMNAME (#alias))
+# else
+# define __REDIRECT_NTH(name, proto, alias) \
+ name proto __asm__ (__ASMNAME (#alias)) __THROW
+# endif
+# define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname)
+# define __ASMNAME2(prefix, cname) __STRING (prefix) cname
+*/
/*
#elif __SOME_OTHER_COMPILER__
@@ -225,6 +251,36 @@
# define __attribute_format_strfmon__(a,b) /* Ignore */
#endif
+/* The nonull function attribute allows to mark pointer parameters which
+ must not be NULL. */
+#if __GNUC_PREREQ (3,3)
+# define __nonnull(params) __attribute__ ((__nonnull__ params))
+#else
+# define __nonnull(params)
+#endif
+
+/* If fortification mode, we warn about unused results of certain
+ function calls which can lead to problems. */
+#if __GNUC_PREREQ (3,4)
+# define __attribute_warn_unused_result__ \
+ __attribute__ ((__warn_unused_result__))
+# if __USE_FORTIFY_LEVEL > 0
+# define __wur __attribute_warn_unused_result__
+# endif
+#else
+# define __attribute_warn_unused_result__ /* empty */
+#endif
+#ifndef __wur
+# define __wur /* Ignore */
+#endif
+
+/* Forces a function to be always inlined. */
+#if __GNUC_PREREQ (3,2)
+# define __always_inline __inline __attribute__ ((__always_inline__))
+#else
+# define __always_inline __inline
+#endif
+
/* It is possible to compile containing GCC extensions even if GCC is
run in pedantic mode if the uses are carefully marked using the
`__extension__' keyword. But this is not generally available before
diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h
index 85dc3d281..c5efca4f9 100644
--- a/include/sys/sysmacros.h
+++ b/include/sys/sysmacros.h
@@ -1,5 +1,5 @@
/* Definitions of macros to access `dev_t' values.
- Copyright (C) 1996, 1997, 1999, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1999, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,6 +25,7 @@
/* If the compiler does not know long long it is out of luck. We are
not going to hack weird hacks to support the dev_t representation
they need. */
+#if 1 /*def __GLIBC_HAVE_LONG_LONG uClibc note: always enable */
__extension__
static __inline unsigned int gnu_dev_major (unsigned long long int __dev)
__THROW;
@@ -36,32 +37,33 @@ static __inline unsigned long long int gnu_dev_makedev (unsigned int __major,
unsigned int __minor)
__THROW;
-#if defined __GNUC__ && __GNUC__ >= 2
+# if defined __GNUC__ && __GNUC__ >= 2
__extension__ static __inline unsigned int
-gnu_dev_major (unsigned long long int __dev) __THROW
+__NTH (gnu_dev_major (unsigned long long int __dev))
{
return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff);
}
__extension__ static __inline unsigned int
-gnu_dev_minor (unsigned long long int __dev) __THROW
+__NTH (gnu_dev_minor (unsigned long long int __dev))
{
return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff);
}
__extension__ static __inline unsigned long long int
-gnu_dev_makedev (unsigned int __major, unsigned int __minor) __THROW
+__NTH (gnu_dev_makedev (unsigned int __major, unsigned int __minor))
{
return ((__minor & 0xff) | ((__major & 0xfff) << 8)
| (((unsigned long long int) (__minor & ~0xff)) << 12)
| (((unsigned long long int) (__major & ~0xfff)) << 32));
}
-#endif
+# endif
/* Access the functions with their traditional names. */
-#define major(dev) gnu_dev_major (dev)
-#define minor(dev) gnu_dev_minor (dev)
-#define makedev(maj, min) gnu_dev_makedev (maj, min)
+# define major(dev) gnu_dev_major (dev)
+# define minor(dev) gnu_dev_minor (dev)
+# define makedev(maj, min) gnu_dev_makedev (maj, min)
+#endif
#endif /* sys/sysmacros.h */