]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* sysdeps/unix/dirstream.h (struct __dirstream): Move lock member
authorUlrich Drepper <drepper@redhat.com>
Fri, 3 Aug 2007 02:43:06 +0000 (02:43 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 3 Aug 2007 02:43:06 +0000 (02:43 +0000)
to fill a hole on 64-bit platforms.

* stdlib/stdlib.h: Remove __strto*_internal prototypes and strto*
inline functions.
* include/stdlib.h: Add __strto*_internal prototypes here.
* wcsmbs/wchar.h: Remove __wcsto*_internal prototypes and wcsto*
inline functions.
* include/wchar.h: Add __wcsto*_internal prototypes.
* sysdeps/generic/inttypes.h: No need to protect the declaration
of the __strto*_internal and __wcsto*_internal members here.

ChangeLog
include/stdlib.h
include/wchar.h
stdlib/stdlib.h
sysdeps/generic/inttypes.h
sysdeps/unix/dirstream.h
wcsmbs/wchar.h

index 4a20a942bf284aae2be1e787b7907d64a9b6f191..2514584e09f210cf86596158d5c49c39d9ca2171 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 2007-08-02  Ulrich Drepper  <drepper@redhat.com>
 
+       * sysdeps/unix/dirstream.h (struct __dirstream): Move lock member
+       to fill a hole on 64-bit platforms.
+
+       * stdlib/stdlib.h: Remove __strto*_internal prototypes and strto*
+       inline functions.
+       * include/stdlib.h: Add __strto*_internal prototypes here.
+       * wcsmbs/wchar.h: Remove __wcsto*_internal prototypes and wcsto*
+       inline functions.
+       * include/wchar.h: Add __wcsto*_internal prototypes.
+       * sysdeps/generic/inttypes.h: No need to protect the declaration
+       of the __strto*_internal and __wcsto*_internal members here.
+
        * rt/mqueue.h: Change const to __const and add nonnull attributes.
 
 2007-08-02  Roland McGrath  <roland@redhat.com>
index 27111b8a854967dea0a5e6021d8ce1cacb06738c..d5c37510135c410824c2305d52a232e64431a13d 100644 (file)
@@ -28,13 +28,6 @@ libc_hidden_proto (qsort)
 libc_hidden_proto (lrand48_r)
 libc_hidden_proto (wctomb)
 libc_hidden_proto (__secure_getenv)
-libc_hidden_proto (__strtof_internal)
-libc_hidden_proto (__strtod_internal)
-libc_hidden_proto (__strtold_internal)
-libc_hidden_proto (__strtol_internal)
-libc_hidden_proto (__strtoll_internal)
-libc_hidden_proto (__strtoul_internal)
-libc_hidden_proto (__strtoull_internal)
 
 extern long int __random (void);
 extern void __srandom (unsigned int __seed);
@@ -100,6 +93,44 @@ extern void *__libc_memalign (size_t alignment, size_t size)
 
 extern int __libc_system (const char *line);
 
+
+extern double __strtod_internal (__const char *__restrict __nptr,
+                                char **__restrict __endptr, int __group)
+     __THROW __nonnull ((1)) __wur;
+extern float __strtof_internal (__const char *__restrict __nptr,
+                               char **__restrict __endptr, int __group)
+     __THROW __nonnull ((1)) __wur;
+extern long double __strtold_internal (__const char *__restrict __nptr,
+                                      char **__restrict __endptr,
+                                      int __group)
+     __THROW __nonnull ((1)) __wur;
+extern long int __strtol_internal (__const char *__restrict __nptr,
+                                  char **__restrict __endptr,
+                                  int __base, int __group)
+     __THROW __nonnull ((1)) __wur;
+extern unsigned long int __strtoul_internal (__const char *__restrict __nptr,
+                                            char **__restrict __endptr,
+                                            int __base, int __group)
+     __THROW __nonnull ((1)) __wur;
+__extension__
+extern long long int __strtoll_internal (__const char *__restrict __nptr,
+                                        char **__restrict __endptr,
+                                        int __base, int __group)
+     __THROW __nonnull ((1)) __wur;
+__extension__
+extern unsigned long long int __strtoull_internal (__const char *
+                                                  __restrict __nptr,
+                                                  char **__restrict __endptr,
+                                                  int __base, int __group)
+     __THROW __nonnull ((1)) __wur;
+libc_hidden_proto (__strtof_internal)
+libc_hidden_proto (__strtod_internal)
+libc_hidden_proto (__strtold_internal)
+libc_hidden_proto (__strtol_internal)
+libc_hidden_proto (__strtoll_internal)
+libc_hidden_proto (__strtoul_internal)
+libc_hidden_proto (__strtoull_internal)
+
 extern double ____strtod_l_internal (__const char *__restrict __nptr,
                                     char **__restrict __endptr, int __group,
                                     __locale_t __loc);
index 89e9a4f81ef19d8cfba1115b108254cdb4ce6856..b3cf373d9ee2a7b786a8b679de4e1209d9ddff0c 100644 (file)
@@ -18,6 +18,32 @@ extern __typeof (wcsftime_l) __wcsftime_l;
 libc_hidden_proto (__wcsftime_l)
 
 
+extern double __wcstod_internal (__const wchar_t *__restrict __nptr,
+                                wchar_t **__restrict __endptr, int __group)
+     __THROW;
+extern float __wcstof_internal (__const wchar_t *__restrict __nptr,
+                               wchar_t **__restrict __endptr, int __group)
+     __THROW;
+extern long double __wcstold_internal (__const wchar_t *__restrict __nptr,
+                                      wchar_t **__restrict __endptr,
+                                      int __group) __THROW;
+extern long int __wcstol_internal (__const wchar_t *__restrict __nptr,
+                                  wchar_t **__restrict __endptr,
+                                  int __base, int __group) __THROW;
+extern unsigned long int __wcstoul_internal (__const wchar_t *__restrict __npt,
+                                            wchar_t **__restrict __endptr,
+                                            int __base, int __group) __THROW;
+__extension__
+extern long long int __wcstoll_internal (__const wchar_t *__restrict __nptr,
+                                        wchar_t **__restrict __endptr,
+                                        int __base, int __group) __THROW;
+__extension__
+extern unsigned long long int __wcstoull_internal (__const wchar_t *
+                                                  __restrict __nptr,
+                                                  wchar_t **
+                                                  __restrict __endptr,
+                                                  int __base,
+                                                  int __group) __THROW;
 libc_hidden_proto (__wcstof_internal)
 libc_hidden_proto (__wcstod_internal)
 libc_hidden_proto (__wcstold_internal)
index dd7874453927121188d4315c79976d030b2b486c..d475668926d98e92d2a95f35b6531c800794c7ae 100644 (file)
@@ -273,125 +273,7 @@ extern long double strtold_l (__const char *__restrict __nptr,
 #endif /* GNU */
 
 
-/* The internal entry points for `strtoX' take an extra flag argument
-   saying whether or not to parse locale-dependent number grouping.  */
-
-extern double __strtod_internal (__const char *__restrict __nptr,
-                                char **__restrict __endptr, int __group)
-     __THROW __nonnull ((1)) __wur;
-extern float __strtof_internal (__const char *__restrict __nptr,
-                               char **__restrict __endptr, int __group)
-     __THROW __nonnull ((1)) __wur;
-extern long double __strtold_internal (__const char *__restrict __nptr,
-                                      char **__restrict __endptr,
-                                      int __group)
-     __THROW __nonnull ((1)) __wur;
-#ifndef __strtol_internal_defined
-extern long int __strtol_internal (__const char *__restrict __nptr,
-                                  char **__restrict __endptr,
-                                  int __base, int __group)
-     __THROW __nonnull ((1)) __wur;
-# define __strtol_internal_defined     1
-#endif
-#ifndef __strtoul_internal_defined
-extern unsigned long int __strtoul_internal (__const char *__restrict __nptr,
-                                            char **__restrict __endptr,
-                                            int __base, int __group)
-     __THROW __nonnull ((1)) __wur;
-# define __strtoul_internal_defined    1
-#endif
-#if defined __GNUC__ || defined __USE_ISOC99
-# ifndef __strtoll_internal_defined
-__extension__
-extern long long int __strtoll_internal (__const char *__restrict __nptr,
-                                        char **__restrict __endptr,
-                                        int __base, int __group)
-     __THROW __nonnull ((1)) __wur;
-#  define __strtoll_internal_defined   1
-# endif
-# ifndef __strtoull_internal_defined
-__extension__
-extern unsigned long long int __strtoull_internal (__const char *
-                                                  __restrict __nptr,
-                                                  char **__restrict __endptr,
-                                                  int __base, int __group)
-     __THROW __nonnull ((1)) __wur;
-#  define __strtoull_internal_defined  1
-# endif
-#endif /* GCC */
-
 #ifdef __USE_EXTERN_INLINES
-/* Define inline functions which call the internal entry points.  */
-
-__BEGIN_NAMESPACE_STD
-__extern_inline double
-__NTH (strtod (__const char *__restrict __nptr, char **__restrict __endptr))
-{
-  return __strtod_internal (__nptr, __endptr, 0);
-}
-__extern_inline long int
-__NTH (strtol (__const char *__restrict __nptr, char **__restrict __endptr,
-              int __base))
-{
-  return __strtol_internal (__nptr, __endptr, __base, 0);
-}
-__extern_inline unsigned long int
-__NTH (strtoul (__const char *__restrict __nptr, char **__restrict __endptr,
-               int __base))
-{
-  return __strtoul_internal (__nptr, __endptr, __base, 0);
-}
-__END_NAMESPACE_STD
-
-# ifdef __USE_ISOC99
-__BEGIN_NAMESPACE_C99
-__extern_inline float
-__NTH (strtof (__const char *__restrict __nptr, char **__restrict __endptr))
-{
-  return __strtof_internal (__nptr, __endptr, 0);
-}
-#  ifndef __LDBL_COMPAT
-__extern_inline long double
-__NTH (strtold (__const char *__restrict __nptr, char **__restrict __endptr))
-{
-  return __strtold_internal (__nptr, __endptr, 0);
-}
-#  endif
-__END_NAMESPACE_C99
-# endif
-
-# ifdef __USE_BSD
-__extension__ __extern_inline long long int
-__NTH (strtoq (__const char *__restrict __nptr, char **__restrict __endptr,
-              int __base))
-{
-  return __strtoll_internal (__nptr, __endptr, __base, 0);
-}
-__extension__ __extern_inline unsigned long long int
-__NTH (strtouq (__const char *__restrict __nptr, char **__restrict __endptr,
-               int __base))
-{
-  return __strtoull_internal (__nptr, __endptr, __base, 0);
-}
-# endif
-
-# if defined __USE_MISC || defined __USE_ISOC99
-__BEGIN_NAMESPACE_C99
-__extension__ __extern_inline long long int
-__NTH (strtoll (__const char *__restrict __nptr, char **__restrict __endptr,
-               int __base))
-{
-  return __strtoll_internal (__nptr, __endptr, __base, 0);
-}
-__extension__ __extern_inline unsigned long long int
-__NTH (strtoull (__const char * __restrict __nptr, char **__restrict __endptr,
-                int __base))
-{
-  return __strtoull_internal (__nptr, __endptr, __base, 0);
-}
-__END_NAMESPACE_C99
-# endif
-
 __BEGIN_NAMESPACE_STD
 __extern_inline double
 __NTH (atof (__const char *__nptr))
index 3f1b316c09d55eadf931cddb6107746c85b1fe72..bf0fffa5c291c8619f6eaf168ddbbebc897a4ce8 100644 (file)
@@ -323,13 +323,11 @@ extern uintmax_t wcstoumax (__const __gwchar_t *__restrict __nptr,
 
 # if __WORDSIZE == 64
 
-/* Like `strtol' but convert to `intmax_t'.  */
-#  ifndef __strtol_internal_defined
 extern long int __strtol_internal (__const char *__restrict __nptr,
                                   char **__restrict __endptr,
-                                  int __base, int __group) __THROW;
-#   define __strtol_internal_defined   1
-#  endif
+                                  int __base, int __group)
+  __THROW __nonnull ((1)) __wur;
+/* Like `strtol' but convert to `intmax_t'.  */
 __extern_inline intmax_t
 __NTH (strtoimax (__const char *__restrict nptr, char **__restrict endptr,
                  int base))
@@ -337,14 +335,12 @@ __NTH (strtoimax (__const char *__restrict nptr, char **__restrict endptr,
   return __strtol_internal (nptr, endptr, base, 0);
 }
 
-/* Like `strtoul' but convert to `uintmax_t'.  */
-#  ifndef __strtoul_internal_defined
 extern unsigned long int __strtoul_internal (__const char *
                                             __restrict __nptr,
                                             char ** __restrict __endptr,
-                                            int __base, int __group) __THROW;
-#   define __strtoul_internal_defined  1
-#  endif
+                                            int __base, int __group)
+  __THROW __nonnull ((1)) __wur;
+/* Like `strtoul' but convert to `uintmax_t'.  */
 __extern_inline uintmax_t
 __NTH (strtoumax (__const char *__restrict nptr, char **__restrict endptr,
                  int base))
@@ -352,13 +348,11 @@ __NTH (strtoumax (__const char *__restrict nptr, char **__restrict endptr,
   return __strtoul_internal (nptr, endptr, base, 0);
 }
 
-/* Like `wcstol' but convert to `intmax_t'.  */
-#  ifndef __wcstol_internal_defined
 extern long int __wcstol_internal (__const __gwchar_t * __restrict __nptr,
                                   __gwchar_t **__restrict __endptr,
-                                  int __base, int __group) __THROW;
-#   define __wcstol_internal_defined   1
-#  endif
+                                  int __base, int __group)
+  __THROW __nonnull ((1)) __wur;
+/* Like `wcstol' but convert to `intmax_t'.  */
 __extern_inline intmax_t
 __NTH (wcstoimax (__const __gwchar_t *__restrict nptr,
                  __gwchar_t **__restrict endptr, int base))
@@ -366,16 +360,13 @@ __NTH (wcstoimax (__const __gwchar_t *__restrict nptr,
   return __wcstol_internal (nptr, endptr, base, 0);
 }
 
-
-/* Like `wcstoul' but convert to `uintmax_t'.  */
-#  ifndef __wcstoul_internal_defined
 extern unsigned long int __wcstoul_internal (__const __gwchar_t *
                                             __restrict __nptr,
                                             __gwchar_t **
                                             __restrict __endptr,
-                                            int __base, int __group) __THROW;
-#   define __wcstoul_internal_defined  1
-#  endif
+                                            int __base, int __group)
+  __THROW __nonnull ((1)) __wur;
+/* Like `wcstoul' but convert to `uintmax_t'.  */
 __extern_inline uintmax_t
 __NTH (wcstoumax (__const __gwchar_t *__restrict nptr,
                  __gwchar_t **__restrict endptr, int base))
@@ -385,14 +376,12 @@ __NTH (wcstoumax (__const __gwchar_t *__restrict nptr,
 
 # else /* __WORDSIZE == 32 */
 
-/* Like `strtol' but convert to `intmax_t'.  */
-#  ifndef __strtoll_internal_defined
 __extension__
 extern long long int __strtoll_internal (__const char *__restrict __nptr,
                                         char **__restrict __endptr,
-                                        int __base, int __group) __THROW;
-#   define __strtoll_internal_defined  1
-#  endif
+                                        int __base, int __group)
+  __THROW __nonnull ((1)) __wur;
+/* Like `strtol' but convert to `intmax_t'.  */
 __extern_inline intmax_t
 __NTH (strtoimax (__const char *__restrict nptr, char **__restrict endptr,
                  int base))
@@ -400,17 +389,15 @@ __NTH (strtoimax (__const char *__restrict nptr, char **__restrict endptr,
   return __strtoll_internal (nptr, endptr, base, 0);
 }
 
-/* Like `strtoul' but convert to `uintmax_t'.  */
-#  ifndef __strtoull_internal_defined
 __extension__
 extern unsigned long long int __strtoull_internal (__const char *
                                                   __restrict __nptr,
                                                   char **
                                                   __restrict __endptr,
                                                   int __base,
-                                                  int __group) __THROW;
-#   define __strtoull_internal_defined 1
-#  endif
+                                                  int __group)
+  __THROW __nonnull ((1)) __wur;
+/* Like `strtoul' but convert to `uintmax_t'.  */
 __extern_inline uintmax_t
 __NTH (strtoumax (__const char *__restrict nptr, char **__restrict endptr,
                  int base))
@@ -418,15 +405,13 @@ __NTH (strtoumax (__const char *__restrict nptr, char **__restrict endptr,
   return __strtoull_internal (nptr, endptr, base, 0);
 }
 
-/* Like `wcstol' but convert to `intmax_t'.  */
-#  ifndef __wcstoll_internal_defined
 __extension__
 extern long long int __wcstoll_internal (__const __gwchar_t *
                                         __restrict __nptr,
                                         __gwchar_t **__restrict __endptr,
-                                        int __base, int __group) __THROW;
-#   define __wcstoll_internal_defined  1
-#  endif
+                                        int __base, int __group)
+  __THROW __nonnull ((1)) __wur;
+/* Like `wcstol' but convert to `intmax_t'.  */
 __extern_inline intmax_t
 __NTH (wcstoimax (__const __gwchar_t *__restrict nptr,
                  __gwchar_t **__restrict endptr, int base))
@@ -435,17 +420,15 @@ __NTH (wcstoimax (__const __gwchar_t *__restrict nptr,
 }
 
 
-/* Like `wcstoul' but convert to `uintmax_t'.  */
-#  ifndef __wcstoull_internal_defined
 __extension__
 extern unsigned long long int __wcstoull_internal (__const __gwchar_t *
                                                   __restrict __nptr,
                                                   __gwchar_t **
                                                   __restrict __endptr,
                                                   int __base,
-                                                  int __group) __THROW;
-#   define __wcstoull_internal_defined 1
-#  endif
+                                                  int __group)
+  __THROW __nonnull ((1)) __wur;
+/* Like `wcstoul' but convert to `uintmax_t'.  */
 __extern_inline uintmax_t
 __NTH (wcstoumax (__const __gwchar_t *__restrict nptr,
                  __gwchar_t **__restrict endptr, int base))
index a1f74473c64e962736df751f05ece85891b3655f..b1d80f001773f755111b1c4967e29efcb7e442bf 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1996, 2007 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
@@ -33,14 +33,14 @@ struct __dirstream
   {
     int fd;                    /* File descriptor.  */
 
+    __libc_lock_define (, lock) /* Mutex lock for this structure.  */
+
     char *data;                        /* Directory block.  */
     size_t allocation;         /* Space allocated for the block.  */
     size_t size;               /* Total valid data in the block.  */
     size_t offset;             /* Current offset into the block.  */
 
     off_t filepos;             /* Position of next entry to read.  */
-
-    __libc_lock_define (, lock) /* Mutex lock for this structure.  */
   };
 
 #define _DIR_dirfd(dirp)       ((dirp)->fd)
index 569fd2b2f679f77b6b6874e00413ee20d283038e..b334e0623117555d80e2d4ec657c48264b803177 100644 (file)
@@ -503,96 +503,6 @@ extern long double wcstold_l (__const wchar_t *__restrict __nptr,
 #endif /* GNU */
 
 
-/* The internal entry points for `wcstoX' take an extra flag argument
-   saying whether or not to parse locale-dependent number grouping.  */
-extern double __wcstod_internal (__const wchar_t *__restrict __nptr,
-                                wchar_t **__restrict __endptr, int __group)
-     __THROW;
-extern float __wcstof_internal (__const wchar_t *__restrict __nptr,
-                               wchar_t **__restrict __endptr, int __group)
-     __THROW;
-extern long double __wcstold_internal (__const wchar_t *__restrict __nptr,
-                                      wchar_t **__restrict __endptr,
-                                      int __group) __THROW;
-
-#if !defined __wcstol_internal_defined \
-    && defined __OPTIMIZE__ && __GNUC__ >= 2
-extern long int __wcstol_internal (__const wchar_t *__restrict __nptr,
-                                  wchar_t **__restrict __endptr,
-                                  int __base, int __group) __THROW;
-# define __wcstol_internal_defined     1
-#endif
-#if !defined __wcstoul_internal_defined \
-    && defined __OPTIMIZE__ && __GNUC__ >= 2
-extern unsigned long int __wcstoul_internal (__const wchar_t *__restrict __npt,
-                                            wchar_t **__restrict __endptr,
-                                            int __base, int __group) __THROW;
-# define __wcstoul_internal_defined    1
-#endif
-#if !defined __wcstoll_internal_defined \
-    && defined __OPTIMIZE__ && __GNUC__ >= 2
-__extension__
-extern long long int __wcstoll_internal (__const wchar_t *__restrict __nptr,
-                                        wchar_t **__restrict __endptr,
-                                        int __base, int __group) __THROW;
-# define __wcstoll_internal_defined    1
-#endif
-#if !defined __wcstoull_internal_defined \
-    && defined __OPTIMIZE__ && __GNUC__ >= 2
-__extension__
-extern unsigned long long int __wcstoull_internal (__const wchar_t *
-                                                  __restrict __nptr,
-                                                  wchar_t **
-                                                  __restrict __endptr,
-                                                  int __base,
-                                                  int __group) __THROW;
-# define __wcstoull_internal_defined   1
-#endif
-
-
-#if defined __OPTIMIZE__ && __GNUC__ >= 2
-/* Define inline functions which call the internal entry points.  */
-__BEGIN_NAMESPACE_C99
-
-__extern_inline double
-__NTH (wcstod (__const wchar_t *__restrict __nptr,
-              wchar_t **__restrict __endptr))
-{ return __wcstod_internal (__nptr, __endptr, 0); }
-__extern_inline long int
-__NTH (wcstol (__const wchar_t *__restrict __nptr,
-              wchar_t **__restrict __endptr, int __base))
-{ return __wcstol_internal (__nptr, __endptr, __base, 0); }
-__extern_inline unsigned long int
-__NTH (wcstoul (__const wchar_t *__restrict __nptr,
-               wchar_t **__restrict __endptr, int __base))
-{ return __wcstoul_internal (__nptr, __endptr, __base, 0); }
-__END_NAMESPACE_C99
-
-# ifdef __USE_GNU
-__extern_inline float
-__NTH (wcstof (__const wchar_t *__restrict __nptr,
-              wchar_t **__restrict __endptr))
-{ return __wcstof_internal (__nptr, __endptr, 0); }
-#  ifndef __LDBL_COMPAT
-__extern_inline long double
-__NTH (wcstold (__const wchar_t *__restrict __nptr,
-               wchar_t **__restrict __endptr))
-{ return __wcstold_internal (__nptr, __endptr, 0); }
-#  endif
-__extension__
-__extern_inline long long int
-__NTH (wcstoq (__const wchar_t *__restrict __nptr,
-              wchar_t **__restrict __endptr, int __base))
-{ return __wcstoll_internal (__nptr, __endptr, __base, 0); }
-__extension__
-__extern_inline unsigned long long int
-__NTH (wcstouq (__const wchar_t *__restrict __nptr,
-               wchar_t **__restrict __endptr, int __base))
-{ return __wcstoull_internal (__nptr, __endptr, __base, 0); }
-# endif /* Use GNU.  */
-#endif /* Optimizing GCC >=2.  */
-
-
 #ifdef __USE_GNU
 /* Copy SRC to DEST, returning the address of the terminating L'\0' in
    DEST.  */