Remove conditional strdup() compiled if OSF isn't defined, and -DOSF

from the Makefile to guarantee that the private version strdup() isn't
compiled in.
This commit is contained in:
simonb 1998-07-29 01:31:50 +00:00
parent eb32016a95
commit b5c503ca40
2 changed files with 3 additions and 20 deletions

View File

@ -1,8 +1,7 @@
# $NetBSD: Makefile,v 1.9 1998/07/29 01:14:16 simonb Exp $
# $NetBSD: Makefile,v 1.10 1998/07/29 01:31:50 simonb Exp $
PROG= newsyslog
CPPFLAGS+= -DOSF
CPPFLAGS+= -DCONF=\"/etc/newsyslog.conf\"
CPPFLAGS+= -DPIDFILE=\"/var/run/syslog.pid\"
CPPFLAGS+= -DCOMPRESS=\"/usr/bin/gzip\"

View File

@ -1,4 +1,4 @@
/* $NetBSD: newsyslog.c,v 1.15 1998/07/06 06:54:06 mrg Exp $ */
/* $NetBSD: newsyslog.c,v 1.16 1998/07/29 01:31:50 simonb Exp $ */
/*
* This file contains changes from the Open Software Foundation.
@ -29,7 +29,7 @@ provided "as is" without express or implied warranty.
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: newsyslog.c,v 1.15 1998/07/06 06:54:06 mrg Exp $");
__RCSID("$NetBSD: newsyslog.c,v 1.16 1998/07/29 01:31:50 simonb Exp $");
#endif /* not lint */
#ifndef CONF
@ -564,22 +564,6 @@ age_old_log(file)
return( (int) (timenow - sb.st_mtime + 1800) / 3600);
}
#ifndef OSF
/* Duplicate a string using malloc */
char *
strdup(strp)
char *strp;
{
char *cp;
if ((cp = malloc((unsigned) strlen(strp) + 1)) == NULL)
abort();
return(strcpy (cp, strp));
}
#endif
/* Skip Over Blanks */
char *sob(p)
char *p;