summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/fnmatch.h19
-rw-r--r--include/langinfo.h7
-rw-r--r--include/libc-internal.h50
-rw-r--r--include/stdio.h6
-rw-r--r--include/stdlib.h35
5 files changed, 53 insertions, 64 deletions
diff --git a/include/fnmatch.h b/include/fnmatch.h
index c0fd6a920..aefb007fb 100644
--- a/include/fnmatch.h
+++ b/include/fnmatch.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,93,96,97,98,99,2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991-93,96,97,98,99,2001,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
@@ -23,19 +23,6 @@
extern "C" {
#endif
-#if defined __cplusplus || (defined __STDC__ && __STDC__) || defined WINDOWS32
-# if !defined __GLIBC__ || !defined __P
-# undef __P
-# define __P(protos) protos
-# endif
-#else /* Not C++ or ANSI C. */
-# undef __P
-# define __P(protos) ()
-/* We can get away without defining `const' here only because in this file
- it is used only inside the prototype for `fnmatch', which is elided in
- non-ANSI C where `const' is problematical. */
-#endif /* C++ or ANSI C. */
-
#ifndef const
# if (defined __STDC__ && __STDC__) || defined __cplusplus
# define __const const
@@ -75,8 +62,8 @@ extern "C" {
/* Match NAME against the filename pattern PATTERN,
returning zero if it matches, FNM_NOMATCH if not. */
-extern int fnmatch __P ((__const char *__pattern, __const char *__name,
- int __flags));
+extern int fnmatch (__const char *__pattern, __const char *__name,
+ int __flags);
#ifdef __cplusplus
}
diff --git a/include/langinfo.h b/include/langinfo.h
index ed38da808..837a87b83 100644
--- a/include/langinfo.h
+++ b/include/langinfo.h
@@ -606,7 +606,7 @@ extern char *nl_langinfo (nl_item __item) __THROW;
#ifdef __UCLIBC_HAS_XLOCALE__
-#ifdef __USE_GNU
+#ifdef __USE_GNU
/* This interface is for the extended locale model. See <locale.h> for
more information. */
@@ -614,12 +614,7 @@ extern char *nl_langinfo (nl_item __item) __THROW;
# include <xlocale.h>
/* Just like nl_langinfo but get the information from the locale object L. */
-#ifdef __UCLIBC_MJN3_ONLY__
-#warning "mjn3 FIXME: nl_langinfo_l has a prototype but isn't defined."
-#endif
extern char *nl_langinfo_l (nl_item __item, __locale_t l);
-extern char *__nl_langinfo_l (nl_item __item, __locale_t l);
-
#endif
#endif
diff --git a/include/libc-internal.h b/include/libc-internal.h
index feb27b812..03f17dd43 100644
--- a/include/libc-internal.h
+++ b/include/libc-internal.h
@@ -19,6 +19,8 @@
#ifndef _LIBC_INTERNAL_H
#define _LIBC_INTERNAL_H 1
+#include <features.h>
+
/* Some nice features only work properly with ELF */
#if defined __HAVE_ELF__
/* Define ALIASNAME as a weak alias for NAME. */
@@ -66,6 +68,9 @@
/* On some platforms we can make internal function calls (i.e., calls of
functions not exported) a bit faster by using a different calling
convention. */
+#if 0 /*def __i386__*/
+# define internal_function __attribute__ ((regparm (3), stdcall))
+#endif
#ifndef internal_function
# define internal_function /* empty */
#endif
@@ -91,6 +96,8 @@
# define __cast__(_to)
#endif
+#define attribute_unused __attribute__ ((unused))
+
/* Arrange to hide uClibc internals */
#if __GNUC_PREREQ (3, 3)
# define attribute_hidden __attribute__ ((visibility ("hidden")))
@@ -98,6 +105,14 @@
# define attribute_hidden
#endif
#define hidden_def(name) extern __typeof (name) name attribute_hidden;
+/* Define ALIASNAME as a hidden weak alias for NAME. */
+# define hidden_weak_alias(name, aliasname) _hidden_weak_alias (name, aliasname)
+# define _hidden_weak_alias(name, aliasname) \
+ extern __typeof (name) aliasname __attribute__ ((weak, alias (#name))) __attribute__ ((visibility ("hidden")));
+/* Define ALIASNAME as a hidden strong alias for NAME. */
+# define hidden_strong_alias(name, aliasname) _hidden_strong_alias(name, aliasname)
+# define _hidden_strong_alias(name, aliasname) \
+ extern __typeof (name) aliasname __attribute__ ((alias (#name))) __attribute__ ((visibility ("hidden")));
#ifdef __UCLIBC_BUILD_RELRO__
# define attribute_relro __attribute__ ((section (".data.rel.ro")))
@@ -142,9 +157,6 @@ typedef __ssize_t ssize_t;
# include <bits/sigset.h>
-/* sources are built w/ _GNU_SOURCE, this gets undefined */
-extern int __xpg_strerror_r (int __errnum, char *__buf, size_t __buflen);
-
/* prototypes for internal use, please keep these in sync w/ updated headers */
/* #include <fcntl.h> */
extern int __open(__const char *__file, int __oflag, ...) attribute_hidden;
@@ -167,6 +179,10 @@ extern char *__strdup (__const char *__s) attribute_hidden;
extern int __strcasecmp (__const char *__s1, __const char *__s2) attribute_hidden;
extern int __strncasecmp (__const char *__s1, __const char *__s2, size_t __n) attribute_hidden;
+/* sources are built w/ _GNU_SOURCE, this gets undefined */
+extern int __xpg_strerror_r_internal (int __errnum, char *__buf, size_t __buflen) attribute_hidden;
+extern char *__glibc_strerror_r_internal (int __errnum, char *__buf, size_t __buflen) attribute_hidden;
+
/* #include <unistd.h> */
extern ssize_t __read(int __fd, void *__buf, size_t __nbytes) attribute_hidden;
extern ssize_t __write(int __fd, __const void *__buf, size_t __n) attribute_hidden;
@@ -175,6 +191,12 @@ extern __pid_t __getpid (void) attribute_hidden;
/* #include <stdio.h> */
extern void __perror (__const char *__s) attribute_hidden;
+extern int __printf (__const char *__restrict __format, ...) attribute_hidden;
+extern int __sprintf (char *__restrict __s,
+ __const char *__restrict __format, ...) attribute_hidden;
+/* hack */
+#define fprintf __fprintf
+#define fclose __fclose
/* #include <stdlib.h> */
extern char *__getenv (__const char *__name) attribute_hidden;
@@ -183,13 +205,29 @@ extern char *__getenv (__const char *__name) attribute_hidden;
extern int __sigprocmask (int __how, __const __sigset_t *__restrict __set,
__sigset_t *__restrict __oset) attribute_hidden;
-/* #include <sys/time.h> */
+/* #include <sys/ioctl.h> */
+extern int __ioctl (int __fd, unsigned long int __request, ...) attribute_hidden;
+
+/* #include <sys/socket.h> */
+extern int __socket (int __domain, int __type, int __protocol) attribute_hidden;
+
# if 0 /* undoable here */
+/* #include <dirent.h> */
+typedef struct __dirstream DIR;
+extern DIR *__opendir (__const char *__name) attribute_hidden;
+extern int __closedir (DIR *__dirp) attribute_hidden;
+
+/* #include <stdio.h> */
+extern int __vfprintf (FILE *__restrict __s, __const char *__restrict __format,
+ __gnuc_va_list __arg) attribute_hidden;
+extern int __fprintf (FILE *__restrict __stream,
+ __const char *__restrict __format, ...) attribute_hidden;
+extern int __fclose (FILE *__stream) attribute_hidden;
+
+/* #include <sys/time.h> */
# define __need_timeval
# include <bits/time.h>
extern int __gettimeofday(struct timeval *__restrict __tv, *__restrict __timezone__ptr_t __tz) attribute_hidden;
-# else
-# define gettimeofday __gettimeofday
# endif
/* #include <pthread.h> */
diff --git a/include/stdio.h b/include/stdio.h
index 54997f8c4..787a6aa52 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -359,9 +359,11 @@ __END_NAMESPACE_C99
extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f,
__gnuc_va_list __arg)
__THROW __attribute__ ((__format__ (__printf__, 2, 0)));
+#if 0 /* uClibc: disabled */
extern int __asprintf (char **__restrict __ptr,
__const char *__restrict __fmt, ...)
__THROW __attribute__ ((__format__ (__printf__, 2, 3)));
+#endif
extern int asprintf (char **__restrict __ptr,
__const char *__restrict __fmt, ...)
__THROW __attribute__ ((__format__ (__printf__, 2, 3)));
@@ -557,9 +559,11 @@ extern char *fgets_unlocked (char *__restrict __s, int __n,
cancellation point. But due to similarity with an POSIX interface
or due to the implementation they are cancellation points and
therefore not marked with __THROW. */
+#if 0 /* uClibc: disabled */
extern __ssize_t __getdelim (char **__restrict __lineptr,
size_t *__restrict __n, int __delimiter,
FILE *__restrict __stream);
+#endif
extern __ssize_t getdelim (char **__restrict __lineptr,
size_t *__restrict __n, int __delimiter,
FILE *__restrict __stream);
@@ -790,7 +794,7 @@ extern char *cuserid (char *__s);
#endif /* Use X/Open, but not issue 6. */
-#ifdef __USE_GNU
+#if 0 /* def __USE_GNU uClibc note: not supported */
struct obstack; /* See <obstack.h>. */
/* Write formatted output to an obstack. */
diff --git a/include/stdlib.h b/include/stdlib.h
index 7f7f15c45..1f0b19b0a 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -286,41 +286,6 @@ extern long double strtold_l (__const char *__restrict __nptr,
__THROW __nonnull ((1, 3)) __wur;
#endif /* __UCLIBC_HAS_FLOATS__ */
-/* Internal names to support libstd++. */
-extern long int __strtol_l (__const char *__restrict __nptr,
- char **__restrict __endptr, int __base,
- __locale_t __loc) __THROW __nonnull ((1, 4));
-
-extern unsigned long int __strtoul_l (__const char *__restrict __nptr,
- char **__restrict __endptr,
- int __base, __locale_t __loc)
- __THROW __nonnull ((1, 4));
-
-__extension__
-extern long long int __strtoll_l (__const char *__restrict __nptr,
- char **__restrict __endptr, int __base,
- __locale_t __loc)
- __THROW __nonnull ((1, 4));
-
-__extension__
-extern unsigned long long int __strtoull_l (__const char *__restrict __nptr,
- char **__restrict __endptr,
- int __base, __locale_t __loc)
- __THROW __nonnull ((1, 4));
-
-#ifdef __UCLIBC_HAS_FLOATS__
-extern double __strtod_l (__const char *__restrict __nptr,
- char **__restrict __endptr, __locale_t __loc)
- __THROW __nonnull ((1, 3));
-
-extern float __strtof_l (__const char *__restrict __nptr,
- char **__restrict __endptr, __locale_t __loc)
- __THROW __nonnull ((1, 3));
-
-extern long double __strtold_l (__const char *__restrict __nptr,
- char **__restrict __endptr,
- __locale_t __loc) __THROW __nonnull ((1, 3));
-#endif /* __UCLIBC_HAS_FLOATS__ */
#endif /* GNU */
#endif /* __UCLIBC_HAS_XLOCALE__ */