bug-gnulib
[Top][All Lists]
Advanced

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

[Bug-gnulib] posixtm patch to assume C89 or better


From: Paul Eggert
Subject: [Bug-gnulib] posixtm patch to assume C89 or better
Date: 09 Sep 2003 20:49:30 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

I installed this:

2003-09-09  Paul Eggert  <address@hidden>

        * posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
        (main): Define with a prototype.
        * posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.

Index: lib/posixtm.c
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/posixtm.c,v
retrieving revision 1.15
diff -p -u -r1.15 posixtm.c
--- lib/posixtm.c       6 Jun 2003 19:19:57 -0000       1.15
+++ lib/posixtm.c       10 Sep 2003 01:15:06 -0000
@@ -25,15 +25,9 @@
 #include <stdbool.h>
 
 #include <stdio.h>
-#if HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
+#include <stdlib.h>
 #include <sys/types.h>
-#if HAVE_STRING_H
-# include <string.h>
-#else
-# include <strings.h>
-#endif
+#include <string.h>
 
 #ifdef TM_IN_SYS_TIME
 # include <sys/time.h>
@@ -294,7 +288,7 @@ END-DATA
 # define MAX_BUFF_LEN 1024
 
 int
-main ()
+main (void)
 {
   char buff[MAX_BUFF_LEN + 1];
 
Index: m4/posixtm.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/posixtm.m4,v
retrieving revision 1.1
diff -p -u -r1.1 posixtm.m4
--- m4/posixtm.m4       31 Dec 2002 13:42:07 -0000      1.1
+++ m4/posixtm.m4       10 Sep 2003 01:15:06 -0000
@@ -1,5 +1,5 @@
-# posixtm.m4 serial 1
-dnl Copyright (C) 2002 Free Software Foundation, Inc.
+# posixtm.m4 serial 2
+dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
 dnl This file is free software, distributed under the terms of the GNU
 dnl General Public License.  As a special exception to the GNU General
 dnl Public License, this file may be distributed as part of a program
@@ -10,5 +10,4 @@ AC_DEFUN([gl_POSIXTM],
 [
   dnl Prerequisites of lib/posixtm.c.
   AC_STRUCT_TM
-  AC_CHECK_HEADERS_ONCE(stdlib.h string.h)
 ])




reply via email to

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