From a86c457f64bde96a95ac0a376f4e24546ac62926 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 7 Aug 2004 07:16:54 +0000 Subject: [PATCH] Merge from gnulib. --- lib/ChangeLog | 5 +++++ lib/canonicalize.h | 18 ++++++++++++++++++ lib/cycle-check.h | 21 +++++++++++++++++++++ lib/stat-macros.h | 2 +- lib/strdup.h | 2 +- lib/strftime.h | 4 +++- lib/xnanosleep.c | 3 ++- m4/ChangeLog | 4 ++++ m4/canonicalize.m4 | 21 ++++++++++++++++++++- m4/getcwd-path-max.m4 | 16 ++++++++++++++++ m4/strdup.m4 | 13 +++++-------- 11 files changed, 96 insertions(+), 13 deletions(-) diff --git a/lib/ChangeLog b/lib/ChangeLog index 5cddfbd..17c7b54 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,8 @@ +2004-08-07 Paul Eggert + + * canonicalize.h, cycle-check.h, stat-macros.h, strdup.h, + strftime.h, xnanosleep.c: Merge from gnulib. + 2004-08-05 Paul Eggert Merge with gnulib and deal with some minor cleanups resulting. diff --git a/lib/canonicalize.h b/lib/canonicalize.h index 3cc083a..2f73de0 100644 --- a/lib/canonicalize.h +++ b/lib/canonicalize.h @@ -1,3 +1,21 @@ +/* Return the canonical absolute name of a given file. + Copyright (C) 1996-2004 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 + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. + If not, write to the Free Software Foundation, + 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + #ifndef CANONICALIZE_H_ # define CANONICALIZE_H_ diff --git a/lib/cycle-check.h b/lib/cycle-check.h index 8c50c30..7b7f54d 100644 --- a/lib/cycle-check.h +++ b/lib/cycle-check.h @@ -1,3 +1,24 @@ +/* help detect directory cycles efficiently + + Copyright (C) 2003, 2004 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 + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. + If not, write to the Free Software Foundation, + 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +/* Written by Jim Meyering */ + #ifndef CYCLE_CHECK_H # define CYCLE_CHECK_H 1 diff --git a/lib/stat-macros.h b/lib/stat-macros.h index 3d32a4d..facbabb 100644 --- a/lib/stat-macros.h +++ b/lib/stat-macros.h @@ -1,6 +1,6 @@ /* stat-related macros - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 1993, 1994, 2001, 2002, 2004 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 diff --git a/lib/strdup.h b/lib/strdup.h index 4dc6a39..d58bd13 100644 --- a/lib/strdup.h +++ b/lib/strdup.h @@ -21,7 +21,7 @@ /* Get strdup declaration, if available. */ #include -#if !HAVE_DECL_STRDUP && !defined strdup +#if defined HAVE_DECL_STRDUP && !HAVE_DECL_STRDUP && !defined strdup /* Duplicate S, returning an identical malloc'd string. */ extern char *strdup (const char *s); #endif diff --git a/lib/strftime.h b/lib/strftime.h index dc9613a..3ff7cea 100644 --- a/lib/strftime.h +++ b/lib/strftime.h @@ -1,6 +1,6 @@ /* declarations for strftime.c - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2004 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 @@ -16,4 +16,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include + size_t nstrftime (char *, size_t, char const *, struct tm const *, int, int); diff --git a/lib/xnanosleep.c b/lib/xnanosleep.c index 4bb217a..6ca43e5 100644 --- a/lib/xnanosleep.c +++ b/lib/xnanosleep.c @@ -22,6 +22,8 @@ # include #endif +#include "xnanosleep.h" + #include #include #include @@ -44,7 +46,6 @@ #include "timespec.h" #include "xalloc.h" -#include "xnanosleep.h" /* Subtract the `struct timespec' values X and Y by computing X - Y. If the difference is negative or zero, return false. diff --git a/m4/ChangeLog b/m4/ChangeLog index 47ba2e0..3c14252 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,7 @@ +2004-08-07 Paul Eggert + + * canonicalize.m4, getcwd-path-max.m4, strdup.m4: Merge from gnulib. + 2004-08-05 Paul Eggert Merge from gnulib. diff --git a/m4/canonicalize.m4 b/m4/canonicalize.m4 index 5845389..0731f4d 100644 --- a/m4/canonicalize.m4 +++ b/m4/canonicalize.m4 @@ -1,4 +1,23 @@ -#serial 2 +#serial 3 + +# Copyright (C) 2003, 2004 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 +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# Written by Jim Meyering. + AC_DEFUN([AC_FUNC_CANONICALIZE_FILE_NAME], [ AC_REQUIRE([AC_HEADER_STDC]) diff --git a/m4/getcwd-path-max.m4 b/m4/getcwd-path-max.m4 index 6c04939..a1e1239 100644 --- a/m4/getcwd-path-max.m4 +++ b/m4/getcwd-path-max.m4 @@ -7,6 +7,22 @@ # I've heard that this is due to a Linux kernel bug, and that it has # been fixed between 2.4.21-pre3 and 2.4.21-pre4. */ +# Copyright (C) 2003, 2004 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 +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + # From Jim Meyering AC_DEFUN([GL_FUNC_GETCWD_PATH_MAX], diff --git a/m4/strdup.m4 b/m4/strdup.m4 index 6e64bc8..9964d15 100644 --- a/m4/strdup.m4 +++ b/m4/strdup.m4 @@ -1,4 +1,4 @@ -# strdup.m4 serial 3 +# strdup.m4 serial 4 dnl Copyright (C) 2002, 2003, 2004 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 @@ -9,12 +9,9 @@ dnl the same distribution terms as the rest of that program. AC_DEFUN([gl_FUNC_STRDUP], [ AC_REPLACE_FUNCS(strdup) - if test $ac_cv_func_strdup = no; then - gl_PREREQ_STRDUP - fi + AC_CHECK_DECLS_ONCE(strdup) + gl_PREREQ_STRDUP ]) -# Prerequisites of lib/strdup.h and lib/strdup.c. -AC_DEFUN([gl_PREREQ_STRDUP], [ - AC_CHECK_DECLS(strdup) -]) +# Prerequisites of lib/strdup.c. +AC_DEFUN([gl_PREREQ_STRDUP], [:]) -- 2.7.4