Module Name: src
Committed By: he
Date: Wed Sep 24 07:53:07 UTC 2014
Modified Files:
src/lib/libc/gen: getcap.c
src/lib/libc/hash: hashhl.c
src/lib/libc/md: mdXhl.c
Log Message:
Provide a backward-compatible conditional define of O_CLOEXEC
for those systems which lack it, since these files are used in
tools builds.
To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/lib/libc/gen/getcap.c
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/hash/hashhl.c
cvs rdiff -u -r1.11 -r1.12 src/lib/libc/md/mdXhl.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/gen/getcap.c
diff -u src/lib/libc/gen/getcap.c:1.54 src/lib/libc/gen/getcap.c:1.55
--- src/lib/libc/gen/getcap.c:1.54 Thu Sep 18 13:58:20 2014
+++ src/lib/libc/gen/getcap.c Wed Sep 24 07:53:06 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: getcap.c,v 1.54 2014/09/18 13:58:20 christos Exp $ */
+/* $NetBSD: getcap.c,v 1.55 2014/09/24 07:53:06 he Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)getcap.c 8.3 (Berkeley) 3/25/94";
#else
-__RCSID("$NetBSD: getcap.c,v 1.54 2014/09/18 13:58:20 christos Exp $");
+__RCSID("$NetBSD: getcap.c,v 1.55 2014/09/24 07:53:06 he Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -65,6 +65,10 @@ __RCSID("$NetBSD: getcap.c,v 1.54 2014/0
#include <string.h>
#include <unistd.h>
+#ifndef O_CLOEXEC /* For tools, as in NetBSD 5.2 or earlier... */
+#define O_CLOEXEC 0
+#endif
+
#if defined(__weak_alias) && !defined(SMALL)
__weak_alias(cgetcap,_cgetcap)
__weak_alias(cgetclose,_cgetclose)
Index: src/lib/libc/hash/hashhl.c
diff -u src/lib/libc/hash/hashhl.c:1.5 src/lib/libc/hash/hashhl.c:1.6
--- src/lib/libc/hash/hashhl.c:1.5 Thu Sep 18 13:58:20 2014
+++ src/lib/libc/hash/hashhl.c Wed Sep 24 07:53:06 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: hashhl.c,v 1.5 2014/09/18 13:58:20 christos Exp $ */
+/* $NetBSD: hashhl.c,v 1.6 2014/09/24 07:53:06 he Exp $ */
/*
* ----------------------------------------------------------------------------
@@ -60,6 +60,9 @@ WA(FNPREFIX(Data),CONCAT(_,FNPREFIX(Data
#define MIN(x,y) ((x)<(y)?(x):(y))
#endif /* !MIN */
+#ifndef O_CLOEXEC /* For tools, as in NetBSD 5.2 or earlier... */
+#define O_CLOEXEC 0
+#endif
char *
FNPREFIX(End)(HASH_CTX *ctx, char *buf)
Index: src/lib/libc/md/mdXhl.c
diff -u src/lib/libc/md/mdXhl.c:1.11 src/lib/libc/md/mdXhl.c:1.12
--- src/lib/libc/md/mdXhl.c:1.11 Thu Sep 18 13:58:20 2014
+++ src/lib/libc/md/mdXhl.c Wed Sep 24 07:53:07 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: mdXhl.c,v 1.11 2014/09/18 13:58:20 christos Exp $ */
+/* $NetBSD: mdXhl.c,v 1.12 2014/09/24 07:53:07 he Exp $ */
/*
* ----------------------------------------------------------------------------
@@ -42,6 +42,9 @@ WA(MDNAME(Data),CONCAT(_,MDNAME(Data)))
#include <stdlib.h>
#include <unistd.h>
+#ifndef O_CLOEXEC /* For tools, as in NetBSD 5.2 or earlier... */
+#define O_CLOEXEC 0
+#endif
char *