bug-gnulib
[Top][All Lists]
Advanced

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

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


From: Bruno Haible
Subject: [Bug-gnulib] strndup patch to assume C89 or better
Date: Wed, 10 Sep 2003 16:24:41 +0200
User-agent: KMail/1.5

May I commit this patch?

        * lib/strndup.c: Include <stdlib.h> and <string.h> unconditionally.
        * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.

*** lib/strndup.c       4 Jul 2000 17:37:43 -0000       1.9
--- lib/strndup.c       10 Sep 2003 13:47:01 -0000
***************
*** 1,4 ****
! /* Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
  
     NOTE: The canonical source of this file is maintained with the GNU C 
Library.
     Bugs can be reported to address@hidden
--- 1,4 ----
! /* Copyright (C) 1996, 1997, 1998, 2000, 2003 Free Software Foundation, Inc.
  
     NOTE: The canonical source of this file is maintained with the GNU C 
Library.
     Bugs can be reported to address@hidden
***************
*** 24,35 ****
  #include <stdio.h>
  #include <sys/types.h>
  
! #if defined _LIBC || defined STDC_HEADERS
! # include <stdlib.h>
! # include <string.h>
! #else
! char *malloc ();
! #endif
  
  #ifndef HAVE_DECL_STRNLEN
  "this configure-time declaration test was not run"
--- 24,31 ----
  #include <stdio.h>
  #include <sys/types.h>
  
! #include <stdlib.h>
! #include <string.h>
  
  #ifndef HAVE_DECL_STRNLEN
  "this configure-time declaration test was not run"
*** m4/strndup.m4       31 Dec 2002 13:42:07 -0000      1.1
--- m4/strndup.m4       10 Sep 2003 13:47:02 -0000
***************
*** 1,5 ****
! # strndup.m4 serial 1
! dnl Copyright (C) 2002 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
--- 1,5 ----
! # strndup.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
***************
*** 19,25 ****
  
  # Prerequisites of lib/strndup.c.
  AC_DEFUN([gl_PREREQ_STRNDUP], [
-   AC_REQUIRE([AC_HEADER_STDC])
    AC_CHECK_DECLS(strnlen)
  ])
  
--- 19,24 ----





reply via email to

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