Commit Graph

95 Commits

Author SHA1 Message Date
thorpej 137c808bb8 Userland portion of fsync_range(2), written by Bill Studenmund, and
contributed by Wasabi Systems, Inc.
2003-11-18 00:56:56 +00:00
agc 039cc95684 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22270, verified by myself.
2003-08-07 09:44:09 +00:00
kristerw c1f62bbe29 Do not give names to the parameters in function prototypes (those names
reduces the usefulness of the gcc -Wshadow flag).
2003-07-08 01:43:28 +00:00
bjh21 4be7a2dcf3 Add a new feature-test macro, _NETBSD_SOURCE. If this is defined
by the application, all NetBSD interfaces are made visible, even
if some other feature-test macro (like _POSIX_C_SOURCE) is defined.
<sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE,
_POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve
existing behaviour.

This has two major advantages:
+ Programs that require non-POSIX facilities but define _POSIX_C_SOURCE
  can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS.
+ It makes most of the #ifs simpler, in that they're all now ORs of the
  various macros, rather than having checks for (!defined(_ANSI_SOURCE) ||
  !defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place.

I've tried not to change the semantics of the headers in any case where
_NETBSD_SOURCE wasn't defined, but there were some places where the
current semantics were clearly mad, and retaining them was harder than
correcting them.  In particular, I've mostly normalised things so that
_ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE,
_XOPEN_SOURCE and _NETBSD_SOURCE in that order.

Tested by building for vax, encouraged by thorpej, and uncontested in
tech-userlevel for a week.
2003-04-28 23:16:11 +00:00
kleink 8c5e6bc1d8 Well, _The_ Open Group. 2003-04-14 08:38:24 +00:00
kleink c9e531d4d4 Use the real TOG specification name for references. 2003-04-14 08:37:29 +00:00
jdolecek e75e2e6438 seteuid() and setegid() were adopted in IEEE Std 1003.1-2001 + X/Open
portability guide issue 6, adjust headers to expose the function
prototypes with appropriate _POSIX_C_SOURCE/_XOPEN_SOURCE defines
fixes standards/21136 by MAEKAWA Masahide
2003-04-14 08:12:11 +00:00
wiz ed54ccdc86 Remove variable name from prototype.
Reported by John Heasley on current-users on 29 July 2001.
2001-07-29 22:18:45 +00:00
kleink 5b5aa6f77e Avoid trad. cpp recursion in intptr_t definition. 2001-07-18 10:18:21 +00:00
christos 8939b770e2 protect against multiple declarations. 2000-12-18 21:22:00 +00:00
kleink 83b6632673 Define intptr_t and uintptr_t via <machine/int_types.h>. 2000-06-27 05:51:54 +00:00
minoura 599d65f132 New syscall issetugid. 2000-04-21 16:24:22 +00:00
christos 2effe6c79a backout previous. the definition of struct option caused too many namespace
collisions. Instead, define getopt_long in getopt.h and getopt in unistd.h
where it belongs.
2000-04-02 06:32:41 +00:00
christos a91d8b9ec7 Add getopt.h and collect all the getopt related stuff here.
Make unistd.h include <getopt.h> to get the getopt stuff.
This adds support for getopt_long from Dieter Baron and Thomas Klausner.
2000-04-01 22:37:14 +00:00
itojun 5b1aaa939e add IPv6 support to rcmd() and friends.
rcmd() and iruserok(): unchanged
	ruserok(): became address family independent
	rcmd_af(), iruesrok_sa(): address family independent
2000-01-27 05:33:06 +00:00
kleink 1bba558e50 Move <null.h> to <sys/null.h> for the purpose of avoiding conflicts due to
std C headers including it, and a kernel module written in C++ would benfit
as well.
2000-01-10 16:58:38 +00:00
kleink c07f17e8d9 For the benefit of G++'s null pointer constant implementation, #define NULL
as __null with egcs 1.0 (GCC 2.90) and above.  As several headers are affected
by this change, move the definition into a new header file, <null.h>, to ease
maintenance.
1999-12-22 21:26:15 +00:00
kleink 087b539e0f Change the declaration of the argv argument to getopt(3) from "char * const *"
(as originally declared in System V) to "char * const []", as was done in
1003.2 and subsequently propagated into XPG4.
From Andrew Cagney in PR lib/8930.
1999-12-02 13:15:55 +00:00
kleink e79a283e47 XSH5: change function signature to `void *sbrk(intptr_t)'. 1999-07-12 21:55:19 +00:00
kleink 2ae70ac652 Move IPv6-related declarations into the implementation-defined domain. 1999-07-03 13:22:06 +00:00
itojun 10f59f2d42 define IPv6 library functions and structures, as defined in
RFC2292 and RFC2553.
define internal state structure for IPv6-transport resolver.

Commits for source code will follow.
1999-07-01 18:15:41 +00:00
kleink d7499b21b3 #ifdef __STDC__ -> #if __STDC__ 1999-04-20 20:15:47 +00:00
sommerfe bb8c6c869a move __getcwd prototypes to libc-private header file.
XXX duplicate the prototype in getcwd regression test (which needs to
call the syscall directly for reasonably complete testing).
1999-03-26 22:23:57 +00:00
sommerfe 80729aa7de Add fchroot, getcwd 1999-03-22 17:59:08 +00:00
kleink e2a4add9f7 brk(2) actually returns an int indicating success (0) or failure (-1). Also,
change its argument to void *.  (Both XSH5).
1999-03-09 20:33:22 +00:00
kleink 13bbe6c70e G/C orphaned unwhiteout() prototype. 1999-03-09 12:46:22 +00:00
thorpej 82865be7fd Change the type of sys_siglist and sys_signame from const char *const [] to
const char *const *, and rename them to __sys_siglist14 and __sys_signame14.
This will prevent the size of the exported symbol from changing when more
signals are added to the list.
1998-11-30 20:36:27 +00:00
kleink 46269c5996 getpgid() is XPG4.2, actually. 1998-11-09 12:45:11 +00:00
mrg 32e9822211 add a prototype for getpgid (missing for years!) 1998-11-06 05:58:09 +00:00
mycroft f886615650 __Namespace__ __protection__. 1998-07-30 00:44:15 +00:00
mycroft a6b6f620db Sprinkle in some __attribute__((noreturn))s. 1998-07-28 00:28:29 +00:00
mycroft 29916a94a6 Slight rearrangement. 1998-07-27 11:09:19 +00:00
mycroft ab22ce8def If __AUDIT__ is defined, remove some traditional interfaces: gets, sprintf,
vsprintf, tempnam, mktemp, getwd.
1998-07-27 09:58:49 +00:00
mycroft 4f4968a946 Mark more functions returning internal buffers for const auditing. 1998-07-27 09:33:44 +00:00
mycroft 633b8f45a9 Make many of the new consts dependent on a new `__AUDIT__' flag, to avoid
breaking third party software.  *sigh*
1998-07-27 09:09:03 +00:00
mycroft 74d731feba KNF nit. 1998-07-26 19:20:55 +00:00
mycroft 4024f73640 const poisoning. 1998-07-26 13:34:18 +00:00
kleink 901ea16862 Addendum to previous change: since pread()'s and pwrite()'s first official
appearance was in X/Open CAE Spec Issue 5 Version 2, add a section for that
and move the prototypes there.
1998-07-02 21:20:54 +00:00
thorpej c0f28f93e4 Prototype pread(2) and pwrite(2) if !defined(_POSIX_C_SOURCE). 1998-06-30 19:46:41 +00:00
kleink 4a8b801d9d Add a prototype for fdatasync(2). 1998-06-05 20:45:39 +00:00
kleink f39087367a * Reorganize name space protection.
* Remove mknod() prototype; it's located in <sys/stat.h> (XPG4.2).
* Remove re_comp() and re_exec() prototypes; their location is <re_comp.h>
  (XPG4.2).
* Move setkey() prototype to <stdlib.h> (XPG4).
* Move mkstemp(), mktemp(), ttyslot() and valloc() prototypes to <stdlib.h>
  (XPG4.2).
Assign copyright to TNF.
1998-06-01 20:06:45 +00:00
kleink 9436b9b06b Make the rename() prototype available to XPG Issue <=3 applications only; the
canonical header for the prototype has been <stdio.h> for quite a while.
1998-05-24 19:13:56 +00:00
kleink 485ed6437f Change the type of the `namelen' argument of gethostname(), getdomainname(),
sethostname(), setdomainname() from int to size_t.  The former change was
made due to an X/Open XNS5 requirement, the latter three were made for
consistency.
1998-05-06 19:59:35 +00:00
kleink 3a1500efe9 Per X/Open CAE Spec Issue 5 Version 2, change the buffer size argument of
readlink() from type `int' to type `size_t'.  This isn't an ABI change, since
the calling convention of our only LP64 platform (the Alpha) already promotes
this argument to a `long'.

This may not be the final action on this matter; readlink() still returns
an `int', which may change in a future revision of the standard.
1998-03-27 13:02:20 +00:00
thorpej 31e20a3875 Prototype getsid(). 1998-02-18 18:24:26 +00:00
kleink c0dde81ddb If standards-compliance is requested by defining the preprocessor symbols
_POSIX_SOURCE or _XOPEN_SOURCE at compile time, use __RENAME() to call
__posix_chown(), __posix_fchown(), __posix_lchown() and __posix_rename()
instead of their NetBSD counterparts in order to remove the requirement of
linking against libposix.
1998-02-14 20:39:26 +00:00
perry b7b7322c68 merge lite-2 1998-02-02 21:07:13 +00:00
kleink f1d296dd60 Per XPG4, move the prototype of swab() from <string.h> to <unistd.h>. 1998-01-12 16:05:40 +00:00
thorpej 4a7fabf18c Update for __vfork14(). 1998-01-05 06:14:51 +00:00
kleink 916831ec4e Add lockf(), an alternate interface to perform advisory record locking;
per XPG4.2.
1997-12-20 20:23:15 +00:00