POSIX.1 requires programs to include <sys/types.h> before including
<grp.h> or <utime.h> while XPG4.2 makes <sys/types.h> optional. So I've included <sys/types.h> to provide the XPG4.2 behavior.
This commit is contained in:
parent
95f26583aa
commit
0f222262ee
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: grp.h,v 1.7 1995/04/29 05:30:40 cgd Exp $ */
|
||||
/* $NetBSD: grp.h,v 1.8 1996/06/11 02:14:01 jtc Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1989, 1993
|
||||
|
@ -43,6 +43,9 @@
|
|||
#ifndef _GRP_H_
|
||||
#define _GRP_H_
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
|
||||
#define _PATH_GROUP "/etc/group"
|
||||
#endif
|
||||
|
@ -54,8 +57,6 @@ struct group {
|
|||
char **gr_mem; /* group members */
|
||||
};
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
struct group *getgrgid __P((gid_t));
|
||||
struct group *getgrnam __P((const char *));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: utime.h,v 1.3 1994/10/26 00:56:39 cgd Exp $ */
|
||||
/* $NetBSD: utime.h,v 1.4 1996/06/11 02:14:05 jtc Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -38,13 +38,14 @@
|
|||
#ifndef _UTIME_H_
|
||||
#define _UTIME_H_
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
struct utimbuf {
|
||||
time_t actime; /* Access time */
|
||||
time_t modtime; /* Modification time */
|
||||
};
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
int utime __P((const char *, const struct utimbuf *));
|
||||
__END_DECLS
|
||||
|
|
Loading…
Reference in New Issue