[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gnulib] dirname patch to assume C89 or better
From: |
Paul Eggert |
Subject: |
[Bug-gnulib] dirname patch to assume C89 or better |
Date: |
08 Sep 2003 16:13:37 -0700 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
I installed this:
2003-09-08 Paul Eggert <address@hidden>
* lib/basename.c, lib/dirname.c, lib/stripslash.c:
Include <string.h> unconditionally.
* m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
headers.
Index: lib/dirname.c
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/dirname.c,v
retrieving revision 1.30
diff -p -u -r1.30 dirname.c
--- lib/dirname.c 5 Apr 2003 06:49:44 -0000 1.30
+++ lib/dirname.c 8 Sep 2003 23:05:01 -0000
@@ -1,5 +1,5 @@
/* dirname.c -- return all but the last element in a path
- Copyright 1990, 1998, 2000, 2001, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1990, 1998, 2000, 2001, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -19,11 +19,9 @@
# include <config.h>
#endif
-#if STDC_HEADERS || HAVE_STRING_H
-# include <string.h>
-#endif
-
#include "dirname.h"
+
+#include <string.h>
#include "xalloc.h"
/* Return the length of `dirname (PATH)', or zero if PATH is
Index: lib/basename.c
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/basename.c,v
retrieving revision 1.21
diff -p -u -r1.21 basename.c
--- lib/basename.c 12 May 2001 15:39:45 -0000 1.21
+++ lib/basename.c 8 Sep 2003 23:05:01 -0000
@@ -1,5 +1,7 @@
/* basename.c -- return the last element in a path
- Copyright (C) 1990, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+ Copyright (C) 1990, 1998, 1999, 2000, 2001, 2003 Free Software
+ Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -19,10 +21,8 @@
# include <config.h>
#endif
-#if STDC_HEADERS || HAVE_STRING_H
-# include <string.h>
-#endif
#include "dirname.h"
+#include <string.h>
/* In general, we can't use the builtin `basename' function if available,
since it has different meanings in different environments.
Index: lib/stripslash.c
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/stripslash.c,v
retrieving revision 1.10
diff -p -u -r1.10 stripslash.c
--- lib/stripslash.c 12 May 2001 15:50:27 -0000 1.10
+++ lib/stripslash.c 8 Sep 2003 23:05:01 -0000
@@ -1,5 +1,5 @@
/* stripslash.c -- remove redundant trailing slashes from a file name
- Copyright (C) 1990, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1990, 2001, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,12 +17,6 @@
#if HAVE_CONFIG_H
# include <config.h>
-#endif
-
-#if STDC_HEADERS || HAVE_STRING_H
-# include <string.h>
-#else
-# include <strings.h>
#endif
#include "dirname.h"
Index: m4/dirname.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/dirname.m4,v
retrieving revision 1.3
diff -p -u -r1.3 dirname.m4
--- m4/dirname.m4 31 Dec 2002 13:42:06 -0000 1.3
+++ m4/dirname.m4 8 Sep 2003 23:05:01 -0000
@@ -1,5 +1,5 @@
-# dirname.m4 serial 1
-dnl Copyright (C) 2002 Free Software Foundation, Inc.
+# dirname.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
@@ -11,15 +11,5 @@ AC_DEFUN([gl_DIRNAME],
dnl Prerequisites of lib/dirname.h.
AC_REQUIRE([jm_AC_DOS])
- dnl Prerequisites of lib/dirname.c.
- AC_REQUIRE([AC_HEADER_STDC])
- AC_CHECK_HEADERS_ONCE(string.h)
-
- dnl Prerequisites of lib/basename.c.
- AC_REQUIRE([AC_HEADER_STDC])
- AC_CHECK_HEADERS_ONCE(string.h)
-
- dnl Prerequisites of lib/stripslash.c.
- AC_REQUIRE([AC_HEADER_STDC])
- AC_CHECK_HEADERS_ONCE(string.h)
+ dnl No prerequisites of lib/basename.c, lib/dirname.c, lib/stripslash.c.
])
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-gnulib] dirname patch to assume C89 or better,
Paul Eggert <=