X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fsavedir.c;h=5a9c339d8cf4ff3a6ad2e7257d7c8ebc95b0e5bb;hb=12cc8b970806cca3260e499c74d2f001df705a60;hp=4c07bffc294b378eeeab952a79f30e669daf0fb3;hpb=6f82b55a4adcf7de3daff54cd1cffa0a4579277e;p=gnulib.git diff --git a/lib/savedir.c b/lib/savedir.c index 4c07bffc2..5a9c339d8 100644 --- a/lib/savedir.c +++ b/lib/savedir.c @@ -1,5 +1,5 @@ /* savedir.c -- save the list of files in a directory in a string - Copyright (C) 1990, 1997 Free Software Foundation, Inc. + Copyright (C) 1990, 1997, 1998 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,13 +17,13 @@ /* Written by David MacKenzie . */ -#ifdef HAVE_CONFIG_H +#if HAVE_CONFIG_H # include #endif #include -#ifdef HAVE_UNISTD_H +#if HAVE_UNISTD_H # include #endif @@ -62,7 +62,9 @@ char *realloc (); # define NULL 0 #endif +#ifndef stpcpy char *stpcpy (); +#endif #include "savedir.h" @@ -87,7 +89,7 @@ savedir (dir, name_size) if (dirp == NULL) return NULL; - name_space = (char *) malloc (name_size ? name_size : 1); + name_space = (char *) malloc (name_size); if (name_space == NULL) { closedir (dirp);