Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tools/compat Include config.h unconditionally; clean up.
details: https://anonhg.NetBSD.org/src/rev/b47c2d0b20c2
branches: trunk
changeset: 521505:b47c2d0b20c2
user: tv <tv%NetBSD.org@localhost>
date: Thu Jan 31 19:23:14 2002 +0000
description:
Include config.h unconditionally; clean up.
diffstat:
tools/compat/fgetln.c | 8 +++-----
tools/compat/flock.c | 11 ++++++-----
tools/compat/getmode.c | 5 +----
tools/compat/pread.c | 4 +---
tools/compat/pwrite.c | 4 +---
tools/compat/setenv.c | 4 +---
tools/compat/setgroupent.c | 6 ++----
tools/compat/setpassent.c | 4 +---
tools/compat/snprintf.c | 4 +++-
9 files changed, 19 insertions(+), 31 deletions(-)
diffs (176 lines):
diff -r ddadf3a69885 -r b47c2d0b20c2 tools/compat/fgetln.c
--- a/tools/compat/fgetln.c Thu Jan 31 19:22:40 2002 +0000
+++ b/tools/compat/fgetln.c Thu Jan 31 19:23:14 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fgetln.c,v 1.2 2002/01/21 20:04:37 tv Exp $ */
+/* $NetBSD: fgetln.c,v 1.3 2002/01/31 19:23:14 tv Exp $ */
/*
* Copyright 1999 Luke Mewburn <lukem%netbsd.org@localhost>.
@@ -27,11 +27,9 @@
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
-#ifndef HAVE_FGETLN
+#if !HAVE_FGETLN
#include <stdlib.h>
#define BUFCHUNKS BUFSIZ
@@ -74,4 +72,4 @@
*len = strlen(buf);
return (buf);
}
-#endif /* HAVE_FGETLN */
+#endif
diff -r ddadf3a69885 -r b47c2d0b20c2 tools/compat/flock.c
--- a/tools/compat/flock.c Thu Jan 31 19:22:40 2002 +0000
+++ b/tools/compat/flock.c Thu Jan 31 19:23:14 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: flock.c,v 1.1 2002/01/21 20:04:37 tv Exp $ */
+/* $NetBSD: flock.c,v 1.2 2002/01/31 19:23:14 tv Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -36,13 +36,14 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-/* Emulate flock() with fcntl(), where available. */
+/*
+ * Emulate flock() with fcntl(), where available.
+ * Otherwise, don't do lokcing; just pretend success.
+ */
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
-#ifndef HAVE_FLOCK
+#if !HAVE_FLOCK
#include <errno.h>
#include <fcntl.h>
diff -r ddadf3a69885 -r b47c2d0b20c2 tools/compat/getmode.c
--- a/tools/compat/getmode.c Thu Jan 31 19:22:40 2002 +0000
+++ b/tools/compat/getmode.c Thu Jan 31 19:23:14 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: getmode.c,v 1.1 2002/01/21 20:04:37 tv Exp $ */
+/* $NetBSD: getmode.c,v 1.2 2002/01/31 19:23:14 tv Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -36,10 +36,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
-
#include <stdlib.h>
void *setmode(const char *str) {
diff -r ddadf3a69885 -r b47c2d0b20c2 tools/compat/pread.c
--- a/tools/compat/pread.c Thu Jan 31 19:22:40 2002 +0000
+++ b/tools/compat/pread.c Thu Jan 31 19:23:14 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pread.c,v 1.1 2002/01/21 20:04:37 tv Exp $ */
+/* $NetBSD: pread.c,v 1.2 2002/01/31 19:23:14 tv Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -38,9 +38,7 @@
/* Emulate pread() with lseek()/read()/lseek(). Not thread-safe, of course. */
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#if !HAVE_PREAD
#include <unistd.h>
diff -r ddadf3a69885 -r b47c2d0b20c2 tools/compat/pwrite.c
--- a/tools/compat/pwrite.c Thu Jan 31 19:22:40 2002 +0000
+++ b/tools/compat/pwrite.c Thu Jan 31 19:23:14 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pwrite.c,v 1.1 2002/01/21 20:04:37 tv Exp $ */
+/* $NetBSD: pwrite.c,v 1.2 2002/01/31 19:23:14 tv Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -38,9 +38,7 @@
/* Emulate pwrite() with lseek()/write()/lseek(). Not thread-safe, of course. */
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#if !HAVE_PWRITE
#include <unistd.h>
diff -r ddadf3a69885 -r b47c2d0b20c2 tools/compat/setenv.c
--- a/tools/compat/setenv.c Thu Jan 31 19:22:40 2002 +0000
+++ b/tools/compat/setenv.c Thu Jan 31 19:23:14 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: setenv.c,v 1.1 2002/01/29 10:20:32 tv Exp $ */
+/* $NetBSD: setenv.c,v 1.2 2002/01/31 19:23:14 tv Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -38,9 +38,7 @@
/* Emulate setenv() with getenv()/malloc()/putenv(). */
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#if !HAVE_SETENV
int setenv(const char *name, const char *value, int overwrite) {
diff -r ddadf3a69885 -r b47c2d0b20c2 tools/compat/setgroupent.c
--- a/tools/compat/setgroupent.c Thu Jan 31 19:22:40 2002 +0000
+++ b/tools/compat/setgroupent.c Thu Jan 31 19:23:14 2002 +0000
@@ -1,10 +1,8 @@
-/* $NetBSD: setgroupent.c,v 1.1 2002/01/29 10:20:32 tv Exp $ */
+/* $NetBSD: setgroupent.c,v 1.2 2002/01/31 19:23:14 tv Exp $ */
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
-#if !HAVE_SETPASSENT
+#if !HAVE_SETGROUPENT
#include <grp.h>
int setgroupent(int stayopen) {
diff -r ddadf3a69885 -r b47c2d0b20c2 tools/compat/setpassent.c
--- a/tools/compat/setpassent.c Thu Jan 31 19:22:40 2002 +0000
+++ b/tools/compat/setpassent.c Thu Jan 31 19:23:14 2002 +0000
@@ -1,8 +1,6 @@
-/* $NetBSD: setpassent.c,v 1.1 2002/01/29 10:20:32 tv Exp $ */
+/* $NetBSD: setpassent.c,v 1.2 2002/01/31 19:23:14 tv Exp $ */
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#if !HAVE_SETPASSENT
#include <pwd.h>
diff -r ddadf3a69885 -r b47c2d0b20c2 tools/compat/snprintf.c
--- a/tools/compat/snprintf.c Thu Jan 31 19:22:40 2002 +0000
+++ b/tools/compat/snprintf.c Thu Jan 31 19:23:14 2002 +0000
@@ -35,7 +35,9 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
-RCSID("$Id: snprintf.c,v 1.1 2002/01/29 10:20:32 tv Exp $");
+#if 0
+RCSID("$Id: snprintf.c,v 1.2 2002/01/31 19:23:14 tv Exp $");
+#endif
#endif
#include <stdio.h>
#include <stdarg.h>
Home |
Main Index |
Thread Index |
Old Index