summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Makefile.in2
-rw-r--r--lib/dirname.c10
-rw-r--r--lib/fnmatch.c24
-rw-r--r--lib/rename.c2
-rw-r--r--lib/savedir.c2
5 files changed, 21 insertions, 19 deletions
diff --git a/lib/Makefile.in b/lib/Makefile.in
index 7cfb5b676b..7740eaf7db 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -23,7 +23,7 @@ VPATH = @srcdir@
CC = @CC@
AR = ar
RANLIB = @RANLIB@
-DEFS = -Dlint @DEFS@
+DEFS = @DEFS@
CFLAGS = @CFLAGS@
YACC = @YACC@
diff --git a/lib/dirname.c b/lib/dirname.c
index 9290614805..15d25967af 100644
--- a/lib/dirname.c
+++ b/lib/dirname.c
@@ -26,11 +26,11 @@ char *malloc ();
#endif
#if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
#include <string.h>
-#ifndef rindex
-#define rindex strrchr
-#endif
#else
#include <strings.h>
+#ifndef strrchr
+#define strrchr rindex
+#endif
#endif
/* Return the leading directories part of PATH,
@@ -46,7 +46,7 @@ dirname (path)
char *slash;
int length; /* Length of result, not including NUL. */
- slash = rindex (path, '/');
+ slash = strrchr (path, '/');
if (slash == 0)
{
/* File is in the current directory. */
@@ -61,7 +61,7 @@ dirname (path)
length = slash - path + 1;
}
- newpath = malloc (length + 1);
+ newpath = (char *) malloc (length + 1);
if (newpath == 0)
return 0;
strncpy (newpath, path, length);
diff --git a/lib/fnmatch.c b/lib/fnmatch.c
index 2fb65b5216..813e281685 100644
--- a/lib/fnmatch.c
+++ b/lib/fnmatch.c
@@ -1,19 +1,21 @@
/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+NOTE: The canonical source of this file is maintained with the GNU C Library.
+Bugs can be reported to bug-glibc@prep.ai.mit.edu.
-This library is distributed in the hope that it will be useful,
+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
-Library General Public License for more details.
+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 Library General Public
-License along with this library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifdef HAVE_CONFIG_H
#include <config.h>
diff --git a/lib/rename.c b/lib/rename.c
index 63193973b6..3788e900eb 100644
--- a/lib/rename.c
+++ b/lib/rename.c
@@ -22,7 +22,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
-#ifndef STDC_HEADERS
+#ifndef errno
extern int errno;
#endif
diff --git a/lib/savedir.c b/lib/savedir.c
index 9a5736451c..1992cf55bf 100644
--- a/lib/savedir.c
+++ b/lib/savedir.c
@@ -57,10 +57,10 @@
#else
char *malloc ();
char *realloc ();
+#endif
#ifndef NULL
#define NULL 0
#endif
-#endif
char *stpcpy ();