Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/usr.sbin/sup Pullup following revisions (requested by t...
details: https://anonhg.NetBSD.org/src/rev/fc4bc9cd7ca4
branches: netbsd-1-5
changeset: 488622:fc4bc9cd7ca4
user: enami <enami%NetBSD.org@localhost>
date: Sat Jul 22 01:40:12 2000 +0000
description:
Pullup following revisions (requested by thorpej):
sup/Makefile.inc 1.6
sup/source/Makefile 1.17
sup/source/read_line.c 1.3
sup/source/supcdefs.h 1.10
sup/source/supextern.h 1.11
Log Message:
You can't just define read_line as fparseln since former keeps the storage
internally but latter allocates everytime.
diffstat:
usr.sbin/sup/Makefile.inc | 5 +++--
usr.sbin/sup/source/Makefile | 15 +++++++++------
usr.sbin/sup/source/read_line.c | 15 +++++++++------
usr.sbin/sup/source/supcdefs.h | 6 +++---
usr.sbin/sup/source/supextern.h | 6 +-----
5 files changed, 25 insertions(+), 22 deletions(-)
diffs (128 lines):
diff -r bf9833b01a5e -r fc4bc9cd7ca4 usr.sbin/sup/Makefile.inc
--- a/usr.sbin/sup/Makefile.inc Fri Jul 21 19:27:42 2000 +0000
+++ b/usr.sbin/sup/Makefile.inc Sat Jul 22 01:40:12 2000 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile.inc,v 1.5 1999/08/24 15:52:52 bouyer Exp $
+# $NetBSD: Makefile.inc,v 1.5.8.1 2000/07/22 01:40:12 enami Exp $
-CPPFLAGS+=-UCMUCS -UCMU -UMACH -DVAR_TMP -DHAS_DAEMON -DHAS_POSIX_DIR -DLIBWRAP
+CPPFLAGS+=-UCMUCS -UCMU -UMACH -DVAR_TMP -DHAS_DAEMON -DHAS_POSIX_DIR \
+ -DLIBWRAP -DHAS_FPARSELN
CPPFLAGS+=-I${.CURDIR}/../source -I${.CURDIR}/../lib -I${.CURDIR}/../sys
CPPFLAGS+=-DEE_XXX
diff -r bf9833b01a5e -r fc4bc9cd7ca4 usr.sbin/sup/source/Makefile
--- a/usr.sbin/sup/source/Makefile Fri Jul 21 19:27:42 2000 +0000
+++ b/usr.sbin/sup/source/Makefile Sat Jul 22 01:40:12 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.16 1999/08/02 05:36:05 erh Exp $
+# $NetBSD: Makefile,v 1.16.8.1 2000/07/22 01:40:13 enami Exp $
# Copyright (c) 1992,1991 Carnegie Mellon University
# All Rights Reserved.
#
@@ -49,12 +49,15 @@
SITE = NETBSD
#SITE = CMUCS
-NETBSD_DEFINES = -UMACH -DVAR_TMP -DHAS_DAEMON -DHAS_POSIX_DIR
-SOLARIS_DEFINES = -UMACH -DVAR_TMP -DHAS_POSIX_DIR -DNEED_VSNPRINTF -DNEED_READ_LINE
+NETBSD_DEFINES = -UMACH -DVAR_TMP -DHAS_DAEMON -DHAS_POSIX_DIR \
+ -DHAS_FPARSELN
+SOLARIS_DEFINES = -UMACH -DVAR_TMP -DHAS_POSIX_DIR -DNEED_VSNPRINTF
AFS_DEFINES = -DAFS -I/usr/afsws/include
-OSF_DEFINES = -UMACH -DOSF -D_BSD -noshrlib -g -DNEED_VSNPRINTF -DVAR_TMP -DNEED_READ_LINE
-SUNOS_DEFINES = -UMACH -D_BSD -DNEED_VSNPRINTF -DVAR_TMP -DHAS_POSIX_DIR -DHAS_DAEMON -DNEED_DAEMON -DNEED_READ_LINE
-CMUCS_DEFINES = -DMACH -DDOPRINT_VA -DNEED_VPRINTF -DNEED_READ_LINE
+OSF_DEFINES = -UMACH -DOSF -D_BSD -noshrlib -g -DNEED_VSNPRINTF \
+ -DVAR_TMP
+SUNOS_DEFINES = -UMACH -D_BSD -DNEED_VSNPRINTF -DVAR_TMP \
+ -DHAS_POSIX_DIR -DHAS_DAEMON -DNEED_DAEMON
+CMUCS_DEFINES = -DMACH -DDOPRINT_VA -DNEED_VPRINTF
NON_MACH_DEFINES = -UMACH
diff -r bf9833b01a5e -r fc4bc9cd7ca4 usr.sbin/sup/source/read_line.c
--- a/usr.sbin/sup/source/read_line.c Fri Jul 21 19:27:42 2000 +0000
+++ b/usr.sbin/sup/source/read_line.c Sat Jul 22 01:40:12 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: read_line.c,v 1.2 1999/08/02 05:36:05 erh Exp $ */
+/* $NetBSD: read_line.c,v 1.2.8.1 2000/07/22 01:40:13 enami Exp $ */
/*
* Copyright (c) 1994 Mats O Jansson <moj%stacken.kth.se@localhost>
@@ -31,11 +31,9 @@
* SUCH DAMAGE.
*/
-#ifdef NEED_READ_LINE
-
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: read_line.c,v 1.2 1999/08/02 05:36:05 erh Exp $");
+__RCSID("$NetBSD: read_line.c,v 1.2.8.1 2000/07/22 01:40:13 enami Exp $");
#endif
#include <sys/param.h>
@@ -62,6 +60,12 @@
int flags; /* unused */
{
static char *buf;
+#ifdef HAS_FPARSELN
+
+ if (buf != NULL)
+ free(buf);
+ return (buf = fparseln(fp, size, lineno, delim, flags));
+#else
static int buflen;
size_t s, len;
@@ -103,6 +107,5 @@
if (size != NULL)
*size = len;
return buf;
+#endif /* HAS_FPARSELN */
}
-
-#endif /* NEED_READ_LINE */
diff -r bf9833b01a5e -r fc4bc9cd7ca4 usr.sbin/sup/source/supcdefs.h
--- a/usr.sbin/sup/source/supcdefs.h Fri Jul 21 19:27:42 2000 +0000
+++ b/usr.sbin/sup/source/supcdefs.h Sat Jul 22 01:40:12 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: supcdefs.h,v 1.9 2000/01/21 17:08:38 mycroft Exp $ */
+/* $NetBSD: supcdefs.h,v 1.9.4.1 2000/07/22 01:40:13 enami Exp $ */
/*
* Copyright (c) 1992 Carnegie Mellon University
@@ -73,9 +73,9 @@
#include <sys/ioctl.h>
#include <sys/resource.h>
#endif /* MACH */
-#ifndef NEED_READ_LINE
+#ifdef HAS_FPARSELN
#include <util.h>
-#endif /* NEED_READ_LINE */
+#endif /* HAS_FPARSELN */
#include <c.h>
#include "sup.h"
#include "supmsg.h"
diff -r bf9833b01a5e -r fc4bc9cd7ca4 usr.sbin/sup/source/supextern.h
--- a/usr.sbin/sup/source/supextern.h Fri Jul 21 19:27:42 2000 +0000
+++ b/usr.sbin/sup/source/supextern.h Sat Jul 22 01:40:12 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: supextern.h,v 1.10 1999/08/24 15:52:54 bouyer Exp $ */
+/* $NetBSD: supextern.h,v 1.10.8.1 2000/07/22 01:40:13 enami Exp $ */
struct stat;
@@ -56,11 +56,7 @@
void quit __P((int, char *, ...));
/* read_line.c */
-#ifdef NEED_READ_LINE
char *read_line __P((FILE *, size_t *, int *, const char[3], int));
-#else
-#define read_line fparseln
-#endif
/* run.c */
int run __P((char *, ...));
Home |
Main Index |
Thread Index |
Old Index