Provide a backward-compatible conditional define of O_CLOEXEC

for those systems which lack it, since these files are used in
tools builds.
This commit is contained in:
he 2014-09-24 07:53:06 +00:00
parent 9113203c75
commit fce45f5a15
3 changed files with 14 additions and 4 deletions

View File

@ -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/09/18 13:58:20 christos Exp $");
#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)

View File

@ -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)

View File

@ -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 *