[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gnulib] readtokens patch to assume C89 or better
From: |
Paul Eggert |
Subject: |
[Bug-gnulib] readtokens patch to assume C89 or better |
Date: |
09 Sep 2003 21:27:27 -0700 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
I installed this:
2003-09-09 Paul Eggert <address@hidden>
* readtokens.c: Include readtokens.h first, to test interface.
Include <stdlib.h>, <string.h> unconditionally.
(init_tokenbuffer): Define with a prototype.
* readtokens.m4 (gl_READTOKENS): Don't check for standard C
headers, memory.h, string.h.
Index: lib/readtokens.c
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/readtokens.c,v
retrieving revision 1.11
diff -p -u -r1.11 readtokens.c
--- lib/readtokens.c 7 Jun 2003 10:16:29 -0000 1.11
+++ lib/readtokens.c 10 Sep 2003 04:22:53 -0000
@@ -31,24 +31,12 @@
# include <config.h>
#endif
-#include <stdio.h>
-
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-#endif
+#include "readtokens.h"
-#if defined (STDC_HEADERS) || defined(HAVE_STRING_H)
-# include <string.h>
-/* An ANSI string.h and pre-ANSI memory.h might conflict. */
-# if !defined (STDC_HEADERS) && defined (HAVE_MEMORY_H)
-# include <memory.h>
-# endif /* not STDC_HEADERS and HAVE_MEMORY_H */
-#else /* not STDC_HEADERS and not HAVE_STRING_H */
-# include <strings.h>
-/* memory.h and strings.h conflict on some systems. */
-#endif /* not STDC_HEADERS and not HAVE_STRING_H */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
-#include "readtokens.h"
#include "unlocked-io.h"
#include "xalloc.h"
@@ -58,8 +46,7 @@
/* Initialize a tokenbuffer. */
void
-init_tokenbuffer (tokenbuffer)
- token_buffer *tokenbuffer;
+init_tokenbuffer (token_buffer *tokenbuffer)
{
tokenbuffer->size = INITIAL_TOKEN_LENGTH;
tokenbuffer->buffer = xmalloc (INITIAL_TOKEN_LENGTH);
Index: m4/readtokens.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/readtokens.m4,v
retrieving revision 1.1
diff -p -u -r1.1 readtokens.m4
--- m4/readtokens.m4 31 Dec 2002 13:42:07 -0000 1.1
+++ m4/readtokens.m4 10 Sep 2003 04:22:53 -0000
@@ -1,5 +1,5 @@
-# readtokens.m4 serial 1
-dnl Copyright (C) 2002 Free Software Foundation, Inc.
+# readtokens.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
@@ -9,6 +9,5 @@ dnl the same distribution terms as the r
AC_DEFUN([gl_READTOKENS],
[
dnl Prerequisites of lib/readtokens.c.
- AC_REQUIRE([AC_HEADER_STDC])
- AC_CHECK_HEADERS_ONCE(memory.h string.h)
+ :
])
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-gnulib] readtokens patch to assume C89 or better,
Paul Eggert <=