bug-gnulib
[Top][All Lists]
Advanced

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

[Bug-gnulib] gnulib "same" merge from coreutils


From: Paul Eggert
Subject: [Bug-gnulib] gnulib "same" merge from coreutils
Date: Thu, 05 Aug 2004 23:23:15 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

I installed this patch to the "same" module, merged from coreutils:

2004-08-05  Paul Eggert  <address@hidden>

        * lib/same.h: Include <stdbool.h>
        (same_name): Return bool, not int.
        * lib/same.c (same_name): Likewise.
        (errno): Don't declare; we assume C89 or better now.

Index: lib/same.h
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/same.h,v
retrieving revision 1.3
diff -p -u -r1.3 same.h
--- lib/same.h  18 Jun 2003 05:52:19 -0000      1.3
+++ lib/same.h  6 Aug 2004 06:17:02 -0000
@@ -1,6 +1,6 @@
 /* Determine whether two file names refer to the same file.
 
-   Copyright (C) 1997, 1998, 1999, 2000, 2003 Free Software
+   Copyright (C) 1997, 1998, 1999, 2000, 2003, 2004 Free Software
    Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
@@ -20,6 +20,8 @@
 #ifndef SAME_H_
 # define SAME_H_ 1
 
-int same_name (const char *source, const char *dest);
+# include <stdbool.h>
+
+bool same_name (const char *source, const char *dest);
 
 #endif /* SAME_H_ */
Index: lib/same.c
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/same.c,v
retrieving revision 1.13
diff -p -u -r1.13 same.c
--- lib/same.c  16 Jan 2004 07:55:43 -0000      1.13
+++ lib/same.c  6 Aug 2004 06:17:02 -0000
@@ -1,5 +1,7 @@
 /* Determine whether two file names refer to the same file.
-   Copyright (C) 1997-2000, 2002-2003 Free Software Foundation, Inc.
+
+   Copyright (C) 1997, 1998, 1999, 2000, 2002, 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
@@ -31,9 +33,6 @@
 #include <sys/stat.h>
 #include <ctype.h>
 #include <errno.h>
-#ifndef errno
-extern int errno;
-#endif
 
 #include <string.h>
 
@@ -56,7 +55,7 @@ extern int errno;
 /* Return nonzero if SOURCE and DEST point to the same name in the same
    directory.  */
 
-int
+bool
 same_name (const char *source, const char *dest)
 {
   /* Compare the basenames.  */




reply via email to

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