]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Remove lots of inline keywords.
authorRoland McGrath <roland@hack.frob.com>
Thu, 7 Feb 2013 22:44:18 +0000 (14:44 -0800)
committerRoland McGrath <roland@hack.frob.com>
Thu, 7 Feb 2013 22:44:18 +0000 (14:44 -0800)
21 files changed:
ChangeLog
csu/libc-tls.c
elf/dl-deps.c
elf/tlsdeschtab.h
include/rounding-mode.h
libio/wfileops.c
locale/elem-hash.h
locale/programs/locarchive.c
locale/setlocale.c
nis/nss-nisplus.h
nscd/connections.c
nscd/nscd-client.h
nss/getent.c
posix/regex_internal.h
resolv/res_send.c
string/memcmp.c
sysdeps/ieee754/dbl-64/x2y2m1.c
sysdeps/unix/sysv/linux/fips-private.h
sysdeps/x86_64/multiarch/strcasestr-nonascii.c
sysdeps/x86_64/multiarch/strstr.c
time/mktime.c

index 6cd6d8376c6bb9ad1c5b74b1c8a198fc6bf044d8..29a6d49a7cc5c46fe3781e87a7935a36f9dc65e8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,42 @@
+2013-02-07  Roland McGrath  <roland@hack.frob.com>
+
+       * nscd/nscd-client.h (__nscd_drop_map_ref):
+       Add __attribute__ ((unused)).
+       * nis/nss-nisplus.h (niserr2nss): Likewise.
+
+       * sysdeps/x86_64/multiarch/strstr.c (__m128i_strloadu): Define it only
+       under [!(USE_AS_STRCASESTR && STRCASESTR_NONASCII)].
+
+       * csu/libc-tls.c (init_static_tls, init_slotinfo):
+       Remove inline keyword.
+       * include/rounding-mode.h (round_away): Likewise.
+       * libio/wfileops.c (adjust_wide_data): Likewise.
+       * sysdeps/x86_64/multiarch/strstr.c (__m128i_strloadu): Likewise.
+       (__m128i_strloadu_tolower): Likewise.
+       * sysdeps/x86_64/multiarch/strcasestr-nonascii.c
+       (__m128i_strloadu_tolower): Likewise.
+       * time/mktime.c (ydhms_diff): Likewise.
+       * locale/elem-hash.h (elem_hash): Likewise.
+       * locale/setlocale.c (setdata): Likewise.
+       * posix/regex_internal.h (re_string_char_size_at): Likewise.
+       (re_string_wchar_at): Likewise.
+       (bitset_not, bitset_merge, bitset_mask): Likewise.
+       [!(__GNUC__ > 3)] (inline): Remove macro.
+       * nscd/nscd-client.h (__nscd_drop_map_ref): Remove inline keyword.
+       * elf/dl-deps.c (_dl_map_object_deps: preload): Likewise.
+       * elf/tlsdeschtab.h (_dl_tlsdesc_resolve_early_return_p): Likewise.
+       (_dl_tlsdesc_wake_up_held_fixups): Likewise.
+       * string/memcmp.c (memcmp_bytes): Likewise.
+       * locale/programs/locarchive.c (compute_hashval): Likewise.
+       * sysdeps/ieee754/dbl-64/x2y2m1.c (mul_split): Likewise.
+       * sysdeps/unix/sysv/linux/fips-private.h (fips_enabled_p): Likewise.
+       * resolv/res_send.c (evNowTime, evCmpTime): Likewise.
+       * nss/getent.c (print_rpc, print_protocols): Likewise.
+       (print_passwd, print_group, print_aliases): Likewise.
+       * nis/nss-nisplus.h (niserr2nss): Likewise.
+       * nscd/connections.c (restart_p): Likewise.
+       Change return type to bool.
+
 2013-02-05  Roland McGrath  <roland@hack.frob.com>
 
        * Makeconfig (all-Depend-files): Add existing
index 90daaa61c1c12aaba013d1beadfa58bd3bc084b7..5fa39eb8d1ca9a5e010a4c7ded3daae632a1f47b 100644 (file)
@@ -75,7 +75,7 @@ size_t _dl_tls_generation;
 TLS_INIT_HELPER
 #endif
 
-static inline void
+static void
 init_slotinfo (void)
 {
   /* Create the slotinfo list.  */
@@ -90,7 +90,7 @@ init_slotinfo (void)
   GL(dl_tls_dtv_slotinfo_list) = &static_slotinfo.si;
 }
 
-static inline void
+static void
 init_static_tls (size_t memsz, size_t align)
 {
   /* That is the size of the TLS memory for this object.  The initialized
index fe90df61b1cdfc094383161969c92f7484d238db..cd1c236b2e46e223abbe997534b7df129ba966a5 100644 (file)
@@ -155,9 +155,7 @@ _dl_map_object_deps (struct link_map *map,
   const char *errstring;
   const char *objname;
 
-  auto inline void preload (struct link_map *map);
-
-  inline void preload (struct link_map *map)
+  void preload (struct link_map *map)
     {
       known[nlist].done = 0;
       known[nlist].map = map;
index 8de986111055dd315132c6dde28eb5aa51490001..155f4fdd9bcef29eb9b51f8ee9d4bc4e0a761256 100644 (file)
@@ -129,7 +129,7 @@ _dl_make_tlsdesc_dynamic (struct link_map *map, size_t ti_offset)
    or a futex wake to wake up any waiting threads, but let's try to
    avoid introducing such dependencies.  */
 
-inline static int
+static int
 _dl_tlsdesc_resolve_early_return_p (struct tlsdesc volatile *td, void *caller)
 {
   if (caller != td->entry)
@@ -147,7 +147,7 @@ _dl_tlsdesc_resolve_early_return_p (struct tlsdesc volatile *td, void *caller)
   return 0;
 }
 
-inline static void
+static void
 _dl_tlsdesc_wake_up_held_fixups (void)
 {
   __rtld_lock_unlock_recursive (GL(dl_load_lock));
index 2f1ab55a808131f1fe0a8b97b65369cda80a25fc..c765551979437aa9f94d136e3f5219ce6b9aba46 100644 (file)
@@ -39,7 +39,7 @@
    MORE_BITS is true if the number is not exactly equal to the
    truncated value or the half-way value, false otherwise.  */
 
-static inline bool
+static bool
 round_away (bool negative, bool last_digit_odd, bool half_bit, bool more_bits,
            int mode)
 {
index 9cd039921d01ea3b7f42d7b3b7cca2e0ce4d3033..d59abbdce76ed74a26a429395ad1b0f5984f29cb 100644 (file)
@@ -551,7 +551,7 @@ libc_hidden_def (_IO_wfile_sync)
    fp->_wide_data->_IO_read_base and fp->_wide_data->_IO_read_end.
 
    Returns 0 on success and -1 on error with the _IO_ERR_SEEN flag set.  */
-static inline int
+static int
 adjust_wide_data (_IO_FILE *fp, bool do_convert)
 {
   struct _IO_codecvt *cv = fp->_codecvt;
index 4343ef561c466d20a821b65f468f488b3ee76fce..a308f5d0ebc5c1936e02b27b69d6e5af8828de62 100644 (file)
@@ -18,7 +18,7 @@
 
 
 /* The hashing function used for the table with collation symbols.  */
-static inline int32_t
+static int32_t
 elem_hash (const char *str, int_fast32_t n)
 {
   int32_t result = n;
index d50ac2b6b7393f20b5514d3be8ee2c11119d196f..70dce9bfd527bbc4b55c7bb89d92e493099bbd4c 100644 (file)
@@ -45,7 +45,7 @@
 
 /* Define the hash function.  We define the function as static inline.
    We must change the name so as not to conflict with simple-hash.h.  */
-#define compute_hashval static inline archive_hashval
+#define compute_hashval static archive_hashval
 #define hashval_t uint32_t
 #include "hashval.h"
 #undef compute_hashval
index 31f658527287082cdffac5be6d1f7355c614ab99..be95519e9fb6db37825252c68d5cd19206cd6072 100644 (file)
@@ -204,7 +204,7 @@ setname (int category, const char *name)
 }
 
 /* Put DATA in *_nl_current[CATEGORY].  */
-static inline void
+static void
 setdata (int category, struct __locale_data *data)
 {
   if (CATEGORY_USED (category))
index f73ff47275ab0da0176a76b5537fcf258d375029..f28a08f1428ac7ec310483095904bcb5123c0aa2 100644 (file)
@@ -28,7 +28,8 @@
 extern const enum nss_status __niserr2nss_tab[] attribute_hidden;
 extern const unsigned int __niserr2nss_count attribute_hidden;
 
-static inline enum nss_status
+static enum nss_status
+__attribute__ ((unused))
 niserr2nss (int errval)
 {
   if ((unsigned int) errval >= __niserr2nss_count)
index f6e232863777258399690cbe83ed1e2f9835725a..feda2237f5be253dafb19a34593d9d40720f3928 100644 (file)
@@ -1859,7 +1859,7 @@ fd_ready (int fd)
 
 
 /* Check whether restarting should happen.  */
-static inline int
+static bool
 restart_p (time_t now)
 {
   return (paranoia && readylist == NULL && nready == nthreads
index 11964f607d501e223346affd0796b4e429660b7c..360852b2a6604af854269f9ae3867fff90b68301 100644 (file)
@@ -362,8 +362,9 @@ extern struct mapped_database *__nscd_get_map_ref (request_type type,
 extern void __nscd_unmap (struct mapped_database *mapped);
 
 /* Drop reference of mapping.  */
-static inline int __nscd_drop_map_ref (struct mapped_database *map,
-                                      int *gc_cycle)
+static int
+__attribute__ ((unused))
+__nscd_drop_map_ref (struct mapped_database *map, int *gc_cycle)
 {
   if (map != NO_MAPPING)
     {
index 64e642f1da57243ba4bf7d630eee586d458d12b6..0689859d2431a835fc0d7ebb90af96c48498bcbd 100644 (file)
@@ -92,7 +92,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
 }
 
 /* This is for aliases */
-static inline void
+static void
 print_aliases (struct aliasent *alias)
 {
   unsigned int i = 0;
@@ -181,7 +181,7 @@ ethers_keys (int number, char *key[])
 }
 
 /* This is for group */
-static inline void
+static void
 print_group (struct group *grp)
 {
   unsigned int i = 0;
@@ -600,7 +600,7 @@ networks_keys (int number, char *key[])
 }
 
 /* Now is all for passwd */
-static inline void
+static void
 print_passwd (struct passwd *pwd)
 {
   printf ("%s:%s:%lu:%lu:%s:%s:%s\n",
@@ -651,7 +651,7 @@ passwd_keys (int number, char *key[])
 }
 
 /* This is for protocols */
-static inline void
+static void
 print_protocols (struct protoent *proto)
 {
   unsigned int i;
@@ -701,7 +701,7 @@ protocols_keys (int number, char *key[])
 }
 
 /* Now is all for rpc */
-static inline void
+static void
 print_rpc (struct rpcent *rpc)
 {
   int i;
index 21cada87d346f37d55352fb1c71fec35d891b526..b2806635a5afa1356467cccc244fd116c95c8827 100644 (file)
@@ -98,7 +98,6 @@
 # define BE(expr, val) __builtin_expect (expr, val)
 #else
 # define BE(expr, val) (expr)
-# define inline
 #endif
 
 /* Number of single byte character.  */
@@ -687,7 +686,7 @@ typedef struct
 
 
 /* Inline functions for bitset operation.  */
-static inline void
+static void
 bitset_not (bitset_t set)
 {
   int bitset_i;
@@ -695,7 +694,7 @@ bitset_not (bitset_t set)
     set[bitset_i] = ~set[bitset_i];
 }
 
-static inline void
+static void
 bitset_merge (bitset_t dest, const bitset_t src)
 {
   int bitset_i;
@@ -703,7 +702,7 @@ bitset_merge (bitset_t dest, const bitset_t src)
     dest[bitset_i] |= src[bitset_i];
 }
 
-static inline void
+static void
 bitset_mask (bitset_t dest, const bitset_t src)
 {
   int bitset_i;
@@ -713,7 +712,7 @@ bitset_mask (bitset_t dest, const bitset_t src)
 
 #ifdef RE_ENABLE_I18N
 /* Inline functions for re_string.  */
-static inline int
+static int
 internal_function __attribute ((pure))
 re_string_char_size_at (const re_string_t *pstr, int idx)
 {
@@ -726,7 +725,7 @@ re_string_char_size_at (const re_string_t *pstr, int idx)
   return byte_idx;
 }
 
-static inline wint_t
+static wint_t
 internal_function __attribute ((pure))
 re_string_wchar_at (const re_string_t *pstr, int idx)
 {
index c790031b4574cff5e3d97af46a65ccdc5d953d24..60da5c901ba32470f75ad7234ec5ebd377ecbbf0 100644 (file)
@@ -155,7 +155,7 @@ evSubTime(struct timespec *res, const struct timespec *minuend,
        }
 }
 
-static inline int
+static int
 evCmpTime(struct timespec a, struct timespec b) {
        long x = a.tv_sec - b.tv_sec;
 
@@ -164,7 +164,7 @@ evCmpTime(struct timespec a, struct timespec b) {
        return (x < 0L ? (-1) : x > 0L ? (1) : (0));
 }
 
-static inline void
+static void
 evNowTime(struct timespec *res) {
        struct timeval now;
 
index 2a73b1c31b75ec38cfc5aa569b854551ddcd1ff5..dd76145f0390f21cc5a6bd1d1be810ee506b02fe 100644 (file)
@@ -88,9 +88,6 @@ typedef unsigned char byte;
 
 static int memcmp_bytes (op_t, op_t) __THROW;
 
-# ifdef  __GNUC__
-__inline
-# endif
 static int
 memcmp_bytes (a, b)
      op_t a, b;
index 0b73f0a2ee4eeb346d3e5683361757f346f5f925..d36a950e36f61a85108fdb312785d05a95b3b870 100644 (file)
@@ -37,7 +37,7 @@ add_split (double *hi, double *lo, double x, double y)
    given that the values are small enough that no overflow occurs and
    large enough (or zero) that no underflow occurs.  */
 
-static inline void
+static void
 mul_split (double *hi, double *lo, double x, double y)
 {
 #ifdef __FP_FAST_FMA
index ceae4891c671cf172b31294f8fab0e067bfe53a3..271dca3e5f24971dd68a975fddcea1a4a1f4b635 100644 (file)
@@ -29,7 +29,7 @@
 /* Return true if FIPS mode is enabled.  See
    sysdeps/generic/fips-private.h for more information.  */
 
-static inline bool
+static bool
 fips_enabled_p (void)
 {
   static enum
index 85b7b35753ca6993d41874a6bdc131b414dc6e57..032a6420d6e5c461205697958cef167c59250172 100644 (file)
@@ -22,7 +22,7 @@
 
 /* Similar to __m128i_strloadu.  Convert to lower case for none-POSIX/C
    locale.  */
-static inline __m128i
+static __m128i
 __m128i_strloadu_tolower (const unsigned char *p)
 {
   union
index 1cc015d0c198a139bb2b8bbc88780f2b08f4abdc..cd63b68c01e88d7bfe4eda77a65e370d8a417b86 100644 (file)
    5.  failed string compare, go back to scanning
  */
 
+#if !(defined USE_AS_STRCASESTR && defined STRCASESTR_NONASCII)
 /* Simple replacement of movdqu to address 4KB boundary cross issue.
    If EOS occurs within less than 16B before 4KB boundary, we don't
    cross to next page.  */
-
-static inline __m128i
+static __m128i
 __m128i_strloadu (const unsigned char * p, __m128i zero)
 {
   if (__builtin_expect ((int) ((size_t) p & 0xfff) > 0xff0, 0))
@@ -99,13 +99,14 @@ __m128i_strloadu (const unsigned char * p, __m128i zero)
     }
   return _mm_loadu_si128 ((__m128i *) p);
 }
+#endif
 
 #if defined USE_AS_STRCASESTR && !defined STRCASESTR_NONASCII
 
 /* Similar to __m128i_strloadu.  Convert to lower case for POSIX/C
    locale and other which have single-byte letters only in the ASCII
    range.  */
-static inline __m128i
+static __m128i
 __m128i_strloadu_tolower (const unsigned char *p, __m128i zero, __m128i uclow,
                          __m128i uchigh, __m128i lcqword)
 {
index 688969be879696f505714502b6b7170a4e2eb382..e75132c2e457af4b5629eef302c0d6dac15fef5c 100644 (file)
@@ -196,7 +196,7 @@ isdst_differ (int a, int b)
    The result may overflow.  It is the caller's responsibility to
    detect overflow.  */
 
-static inline time_t
+static time_t
 ydhms_diff (long_int year1, long_int yday1, int hour1, int min1, int sec1,
            int year0, int yday0, int hour0, int min0, int sec0)
 {