From owner-svn-src-all@FreeBSD.ORG Wed Mar 4 03:32:29 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2CA8106564A; Wed, 4 Mar 2009 03:32:28 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C17038FC26; Wed, 4 Mar 2009 03:32:28 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n243WSa2030447; Wed, 4 Mar 2009 03:32:28 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n243WS9D030446; Wed, 4 Mar 2009 03:32:28 GMT (envelope-from das@svn.freebsd.org) Message-Id: <200903040332.n243WS9D030446@svn.freebsd.org> From: David Schultz Date: Wed, 4 Mar 2009 03:32:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189351 - head/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2009 03:32:29 -0000 Author: das Date: Wed Mar 4 03:32:28 2009 New Revision: 189351 URL: http://svn.freebsd.org/changeset/base/189351 Log: - Add getsid, fchdir, getpgid, lchown, pread, pwrite, truncate, *at, and fexecve to the POSIX.1-2008 namespace. - Remove getwd, ualarm, usleep, and vfork from the XSI namespace. - Remove mkdtemp from the POSIX.1-2008 namespace (should be in stdlib.h). Modified: head/include/unistd.h Modified: head/include/unistd.h ============================================================================== --- head/include/unistd.h Wed Mar 4 03:31:51 2009 (r189350) +++ head/include/unistd.h Wed Mar 4 03:32:28 2009 (r189351) @@ -413,6 +413,33 @@ int setegid(gid_t); int seteuid(uid_t); #endif +/* 1003.1-2008 */ +#if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE +int getsid(pid_t _pid); +int fchdir(int); +int getpgid(pid_t _pid); +int lchown(const char *, uid_t, gid_t); +ssize_t pread(int, void *, size_t, off_t); +ssize_t pwrite(int, const void *, size_t, off_t); + +/* See comment at ftruncate() above. */ +#ifndef _TRUNCATE_DECLARED +#define _TRUNCATE_DECLARED +int truncate(const char *, off_t); +#endif +#endif /* __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE */ + +#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE +int faccessat(int, const char *, int, int); +int fchmodat(int, const char *, mode_t, int); +int fchownat(int, const char *, uid_t, gid_t, int); +int fexecve(int, char *const [], char *const []); +int linkat(int, const char *, int, const char *, int); +ssize_t readlinkat(int, const char * __restrict, char * __restrict, size_t); +int symlinkat(const char *, int, const char *); +int unlinkat(int, const char *, int); +#endif /* __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE */ + /* * symlink() was originally in POSIX.1a, which was withdrawn after * being overtaken by events (1003.1-2001). It was in XPG4.2, and of @@ -427,16 +454,9 @@ int symlink(const char * __restrict, co char *crypt(const char *, const char *); /* char *ctermid(char *); */ /* XXX ??? */ int encrypt(char *, int); -int fchdir(int); long gethostid(void); -int getpgid(pid_t _pid); -int getsid(pid_t _pid); -char *getwd(char *); /* LEGACY: obsoleted by getcwd() */ -int lchown(const char *, uid_t, gid_t); int lockf(int, int, off_t); int nice(int); -ssize_t pread(int, void *, size_t, off_t); -ssize_t pwrite(int, const void *, size_t, off_t); int setpgrp(pid_t _pid, pid_t _pgrp); /* obsoleted by setpgid() */ int setregid(gid_t, gid_t); int setreuid(uid_t, uid_t); @@ -447,15 +467,7 @@ void swab(const void * __restrict, void #endif /* _SWAB_DECLARED */ void sync(void); -useconds_t ualarm(useconds_t, useconds_t); -int usleep(useconds_t); -pid_t vfork(void); -/* See comment at ftruncate() above. */ -#ifndef _TRUNCATE_DECLARED -#define _TRUNCATE_DECLARED -int truncate(const char *, off_t); -#endif #endif /* __XSI_VISIBLE */ #if __XSI_VISIBLE <= 500 || __BSD_VISIBLE @@ -467,6 +479,14 @@ char *getpass(const char *); void *sbrk(intptr_t); #endif +#if __XSI_VISIBLE <= 600 || __BSD_VISIBLE +char *getwd(char *); /* obsoleted by getcwd() */ +useconds_t + ualarm(useconds_t, useconds_t); +int usleep(useconds_t); +pid_t vfork(void); +#endif + #if __BSD_VISIBLE struct timeval; /* select(2) */ int acct(const char *); @@ -494,7 +514,10 @@ int initgroups(const char *, gid_t); int iruserok(unsigned long, int, const char *, const char *); int iruserok_sa(const void *, int, int, const char *, const char *); int issetugid(void); +#ifndef _MKDTEMP_DECLARED char *mkdtemp(char *); +#define _MKDTEMP_DECLARED +#endif #ifndef _MKNOD_DECLARED int mknod(const char *, mode_t, dev_t); #define _MKNOD_DECLARED @@ -560,17 +583,6 @@ void *valloc(size_t); /* obsoleted by extern int optreset; /* getopt(3) external variable */ #endif #endif /* __BSD_VISIBLE */ - -#if __BSD_VISIBLE -int faccessat(int, const char *, int, int); -int fchmodat(int, const char *, mode_t, int); -int fchownat(int, const char *, uid_t, gid_t, int); -int fexecve(int, char *const [], char *const []); -int linkat(int, const char *, int, const char *, int); -ssize_t readlinkat(int, const char * __restrict, char * __restrict, size_t); -int symlinkat(const char *, int, const char *); -int unlinkat(int, const char *, int); -#endif /* __BSD_VISIBLE */ __END_DECLS #endif /* !_UNISTD_H_ */