Commit Graph

76 Commits

Author SHA1 Message Date
kleink bc89c06cbf Add strtof(3) and strtold(3); welcome libc 12.137. 2006-03-15 17:35:17 +00:00
perry 5f65228b74 u_intN_t -> uintN_t 2005-12-26 19:01:47 +00:00
perry 971a8b8cc7 __const__ -> const
This is in an __attribute__ so it isn't really necessary, but it gets
it out of the listing of __keyword__s...
2005-12-24 23:04:05 +00:00
kleink ffff20ba60 Move getenv_r() to the local section. 2005-09-26 12:51:34 +00:00
christos e86a6cb1b4 Add getenv_r and ttyname_r 2005-09-25 20:08:15 +00:00
christos 66412e7240 compat code reorg 2005-09-13 01:44:32 +00:00
christos 08cd5f47c8 Add a macro __MKTEMP_OK__ that renames mktemp() to _mktemp() for uses that
have been checked, so that the linker does not warn us. There are valid
uses for mktemp() such as for creating filenames that are going to be
targets of the rename system call. Discussed with lukem.
2005-06-11 22:58:42 +00:00
perry 19b7469a00 de-__P -- the hack is long since useless. Discussed with christos,
matt, kleink, others. Approved by christos.
2005-02-03 04:39:32 +00:00
atatat 2803cf768c Add a function called getdevmajor().
It tells you the major device number for whatever character or block
device you ask it.  This is sort of the inverse of devname(3) but not
quite, since it's backed by the kernel (sysctl's kern.drivers
information) and not a database cobbled together from the contents of
the filesystem.
2004-12-16 03:54:56 +00:00
christos 58fadb2d69 Add unix/98 pty function prototypes. 2004-05-27 02:58:14 +00:00
christos fe069d7c1f more const sprinkling on cget* suggested by kleink. 2004-04-23 14:44:54 +00:00
christos e1beeda0ae constify the db name vector argument. 2004-04-23 14:37:42 +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
kleink 13dee93fb3 1003.1-2001 has introduced unsetenv() which differs from the current
implementation in not permitting a "name=value" argument.
* Add a conforming __unsetenv13() and do function renaming for
  unsetenv(); preserve old symbol with old behavior.
* Make visible setenv() and unsetenv() for 1003.1-2001 feature selection
  macros; resolves PR standards/20479.
2003-04-07 13:41:13 +00:00
bjh21 22ebd2b34b Add _Exit(), for C99 and POSIX-2001.
Proposed on tech-userlevel to a resounding silence in April last year.
2003-03-01 15:59:02 +00:00
lukem 6ca5b5bb68 add strsuftoll(3) and strsuftollx(3) - parse a string for a number
with an optional suffix, product (two numbers separated by `x'), and
provide range checking
2002-11-29 12:58:14 +00:00
itojun e68f73c3fe add arc4random(3). from openbsd 2002-05-24 04:01:43 +00:00
kleink a1560723b0 Don't declare qdiv() when qdiv_t wasn't defined previously; fixes PR lib/11557
from Richard Earnshaw.
2001-03-28 11:12:19 +00:00
kleink 77fbd9fe1c Sprinkle some restrict qualifiers. 2001-03-21 22:42:28 +00:00
cgd 713e55ce85 add prototypes for shquote() and shquotev() 2001-03-10 01:46:08 +00:00
cgd 920472acb3 add prototypes for getprogname and setprogname 2001-02-19 22:12:41 +00:00
christos 0b49c77063 deal with bsearch duplicate declaration. 2000-12-20 18:35:21 +00:00
briggs e4bb13f3cd Move fmtcheck() prototype to stdio.h. It makes more sense to declare it
with the formatting functions with which it is meant to be used.  Thanks
to Klaus Klein for "encouraging" me to make this change.
2000-11-15 15:44:05 +00:00
briggs d00ebb12e9 Add {__,}fmtcheck(), a function specified by Bill Sommerfeld to check
a user-supplied format string against a fallback format string to ensure
that they will consume arguments of the same type.

libc minor bump for new API entry point.
2000-10-20 18:46:05 +00:00
sommerfeld 60e54bbbdc Allow format-arg checking for setproctitle 2000-10-03 19:53:58 +00:00
kleink bc3eaa0a03 ISO/IEC 9899:1999: MB_CUR_MAX expands to a positive integer expression with
type size_t (not int).

(Incompatible ABI change, ignored due to a window of just two days.)
2000-08-10 10:03:43 +00:00
tshiozak 51a53de0d5 Preparation for the future introduction of multibyte locale.
- MB_LEN_MAX is increased to 32.
 - To ensure binary compatibility for old executables
   under multibyte locale, versioned setlocale is added.
 - __mb_len_cur definision is added in setlocale.c
   and enable it in stdlib.h .
   It is also important for multibyte locale stuffs,
   but I just forgot.
2000-08-08 22:31:13 +00:00
kleink e4d7c2e329 Add ISO C99 long long integer general utility interfaces; partially addresses
PR standards/9482.
2000-03-06 18:32:22 +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 e2b924d2ae Add l64a_r(), a reentrant version of l64a(); found in the Multithreading
Extension of SVID4.
1999-02-06 15:04:05 +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 cbb3325e89 Actually, FreeBSD calls this mkdtemp(). No point in creating a new name. 1998-07-27 16:12:01 +00:00
mycroft 7daf213c0f Add a mktempdir(), like mkstemp(), but it creates a directory. 1998-07-27 16:05:07 +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 b223acf69a const poisoning. 1998-07-26 23:03:30 +00:00
kleink 9b9e255051 * Further name space protection reorganization: distinguish between various
issues of the XPG.
* Move setkey() prototype from <unistd.h> to this file. (XPG4)
* Move mkstemp(), mktemp(), ttyslot() and valloc() prototypes from <unistd.h>
  to this file. (XPG4.2)
1998-06-01 20:10:15 +00:00
kleink ff08122ed4 Reorganize name space protection. 1998-05-11 12:00:27 +00:00
kleink df0d6631b5 Per XPG4.2, change the `n' argument of initstate() to size_t. (Since it was
recently changed from int to long (lite-2 import), I saw no reason to delay
this `alignment'.)
1998-02-04 21:06:14 +00:00
perry b7b7322c68 merge lite-2 1998-02-02 21:07:13 +00:00
thorpej 5caf2349e4 Fix the prototypes for srandom() and initstate() after the libc/stdlib lite-2
merge (ints -> longs).  The only platform on which this might have caused
a problem is the Alpha, and it happens to be safe because the first 6 arguments
are passed in registers on the Alpha (and are thus implicitly promoted to
longs anyhow).
1998-01-31 20:36:47 +00:00
christos 410b3b428a devname is (dev_t, mode_t) not (int, int) 1997-10-16 23:24:49 +00:00
mikel e95e818cbd some minor KNF 1997-07-14 00:30:28 +00:00