bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 08/13] parse-datetime, parse-duration: no 'static inline'


From: Paul Eggert
Subject: [PATCH 08/13] parse-datetime, parse-duration: no 'static inline'
Date: Thu, 08 Nov 2012 23:50:51 -0800
User-agent: Mozilla/5.0 (X11; Linux i686; rv:16.0) Gecko/20121028 Thunderbird/16.0.2

* lib/parse-datetime.y (to_uchar):
* lib/parse-duration.c (str_const_to_ul, str_const_to_l)
(scale_n_add):
Now static, not static inline.
* m4/parse-datetime.m4 (gl_PARSE_DATETIME):
* modules/parse-duration (configure.ac):
Do not require AC_C_INLINE.
---
 ChangeLog              | 9 +++++++++
 lib/parse-datetime.y   | 2 +-
 lib/parse-duration.c   | 6 +++---
 m4/parse-datetime.m4   | 3 +--
 modules/parse-duration | 2 --
 5 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index abc5d7c..05c581c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2012-11-08  Paul Eggert  <address@hidden>
 
+       parse-datetime, parse-duration: no 'static inline'
+       * lib/parse-datetime.y (to_uchar):
+       * lib/parse-duration.c (str_const_to_ul, str_const_to_l)
+       (scale_n_add):
+       Now static, not static inline.
+       * m4/parse-datetime.m4 (gl_PARSE_DATETIME):
+       * modules/parse-duration (configure.ac):
+       Do not require AC_C_INLINE.
+
        getaddrinfo: no 'static inline'
        * lib/getaddrinfo.c (validate_family):
        Now static, not static inline.
diff --git a/lib/parse-datetime.y b/lib/parse-datetime.y
index 4d9f65a..b0c7c0b 100644
--- a/lib/parse-datetime.y
+++ b/lib/parse-datetime.y
@@ -116,7 +116,7 @@ typedef time_t long_time_t;
 /* Convert a possibly-signed character to an unsigned character.  This is
    a bit safer than casting to unsigned char, since it catches some type
    errors that the cast doesn't.  */
-static inline unsigned char to_uchar (char ch) { return ch; }
+static unsigned char to_uchar (char ch) { return ch; }
 
 /* Lots of this code assumes time_t and time_t-like values fit into
    long_time_t.  */
diff --git a/lib/parse-duration.c b/lib/parse-duration.c
index e49060a..8ae2844 100644
--- a/lib/parse-duration.c
+++ b/lib/parse-duration.c
@@ -54,14 +54,14 @@ typedef enum {
 #define TIME_MAX        0x7FFFFFFF
 
 /* Wrapper around strtoul that does not require a cast.  */
-static unsigned long inline
+static unsigned long
 str_const_to_ul (cch_t * str, cch_t ** ppz, int base)
 {
   return strtoul (str, (char **)ppz, base);
 }
 
 /* Wrapper around strtol that does not require a cast.  */
-static long inline
+static long
 str_const_to_l (cch_t * str, cch_t ** ppz, int base)
 {
   return strtol (str, (char **)ppz, base);
@@ -70,7 +70,7 @@ str_const_to_l (cch_t * str, cch_t ** ppz, int base)
 /* Returns BASE + VAL * SCALE, interpreting BASE = BAD_TIME
    with errno set as an error situation, and returning BAD_TIME
    with errno set in an error situation.  */
-static time_t inline
+static time_t
 scale_n_add (time_t base, time_t val, int scale)
 {
   if (base == BAD_TIME)
diff --git a/m4/parse-datetime.m4 b/m4/parse-datetime.m4
index 3fb2d2b..cbc8ab3 100644
--- a/m4/parse-datetime.m4
+++ b/m4/parse-datetime.m4
@@ -1,4 +1,4 @@
-# parse-datetime.m4 serial 20
+# parse-datetime.m4 serial 21
 dnl Copyright (C) 2002-2006, 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -32,7 +32,6 @@ AC_DEFUN([gl_PARSE_DATETIME],
 
   dnl Prerequisites of lib/parse-datetime.y.
   AC_REQUIRE([gl_BISON])
-  AC_REQUIRE([AC_C_INLINE])
   AC_REQUIRE([gl_C_COMPOUND_LITERALS])
   AC_STRUCT_TIMEZONE
   AC_REQUIRE([gl_CLOCK_TIME])
diff --git a/modules/parse-duration b/modules/parse-duration
index a0da1b3..46288c0 100644
--- a/modules/parse-duration
+++ b/modules/parse-duration
@@ -8,7 +8,6 @@ lib/parse-duration.c
 Depends-on:
 
 configure.ac:
-AC_REQUIRE([AC_C_INLINE])
 
 Makefile.am:
 lib_SOURCES += parse-duration.c
@@ -21,4 +20,3 @@ LGPLv2+
 
 Maintainer:
 Bruce Korb
-
-- 
1.7.11.7




reply via email to

[Prev in Thread] Current Thread [Next in Thread]