Commit Graph

1233 Commits

Author SHA1 Message Date
christos 82c43e19fc tell about getdents, not getdirentries 2008-01-09 20:55:03 +00:00
perry fc883a791d change some __attribute__s to __keywords 2007-12-24 17:26:09 +00:00
christos 03dcf031ab humanize_number was the only function in <util.h> that is not in libutil.
Move it to stdlib.h and add dehumanize_number.
2007-12-14 16:36:19 +00:00
christos 14c8a52580 From Richard M Kreuter, add GLOB_PERIOD. 2007-12-05 20:25:54 +00:00
rmind c75dc3277a Unify the license: All rights reserved.
No functional change.
2007-11-28 19:30:55 +00:00
ad 95182011ed Enable posix_memalign(). 2007-11-19 14:48:41 +00:00
ad acdc596fb9 Add _lwp_ctl() - sorry, I thought I had checked this in yesterday along
with makelintstub.
2007-11-13 17:38:55 +00:00
joerg 6475789b74 Add kvm_dump_header and implement kvm_dump_wrtheader on top of it.
This function allows the caller finer control of how the writes happen
and doesn't force stdio as interface. Optimise clear_gap a bit to not
fill the gap byte-wise. Bump minor version of libkvm.
2007-11-08 20:48:04 +00:00
christos cae365bd34 revert the reversion of the previous change. Kill _NETBSD_SOURCE again. 2007-11-08 20:29:35 +00:00
dogcow 98a43c1f52 Revert the other part of the getopt_long changes to fix non-NetBSD builds;
viz -r1.22 -r1.23 src/lib/libc/stdlib/getopt_long.c
2007-11-07 09:03:58 +00:00
ad 172e40df21 Add _lwp_setname, _lwp_getname. 2007-11-07 00:34:45 +00:00
christos 1af253e4c7 remove featuretest.h and NETBSD_SOURCE conditional ifdefs. This is not
a standard header and does not have namespace issues.
2007-11-06 19:21:18 +00:00
christos dc2d7f4fa6 don't use u_long because it is present only with _NETBSD_SOURCE 2007-10-30 20:02:48 +00:00
christos e2347743fc kill _NETBSD_TOOLS. 2007-10-19 15:58:52 +00:00
christos 6c18907891 Introduce _NETBSD_TOOLS for symbols the are needed in tools build 2007-10-18 02:23:37 +00:00
christos ab7f7a664a don't set obsolete flags in SETALL. From Anon Ymous 2007-10-07 01:23:17 +00:00
christos fbe2281123 fix reversed comment. 2007-10-07 00:37:11 +00:00
christos b093a7796c split LOGIN_SETGROUP -> LOGIN_SETGID|LOGIN_SETGROUPS 2007-10-06 21:51:21 +00:00
yamt 3bae22298f kill another definition of bool. 2007-10-06 16:17:34 +00:00
lukem e9aa053c09 Add raise_default_signal(3) -- raise the default signal handler.
Can be used by applications that have their own SIGINT (et al)
handlers and want to exit in a manner that correctly
signals to the parent that the process was terminated by a signal.
See http://www.cons.org/cracauer/sigint.html for more info.
Discussed on tech-userlevel@.
2007-09-25 01:13:54 +00:00
rmind 9861030b19 - Correct the value of _POSIX_SYMLINK_MAX as defined in standard.
Closes PR/37007 by Ighighi.
- While here, increase _POSIX_CHILD_MAX as suggested by standard.
2007-09-21 01:41:43 +00:00
rmind 2cecf9bbe9 Implementation of POSIX message queues.
Reviewed by: <ad>, <tech-kern>
2007-09-07 18:56:02 +00:00
drochner 9d8b5fa74e Add C99 complex support, for double and float.
Most complex function implementations are from the "c9x-complex" library,
originating from the "cephes" math library, see
http://www.netlib.org/cephes/, from Stephen L. Moshier, incorporated and
redistributed with the NetBSD license by permission of the author.

Error behaviour and other boundary conditions (branch cuts)
need to be looked at.

For namespace sanity, I've done the rename/weak alias procedure to
most of the exported functions which are also used internally.
Didn't do so for sin/cos(f) yet because assembler implementations use
them directly, and renaming functions shared between the main libm
and the machine specific "overlay" might raise binary compatibility
issues.
2007-08-20 16:01:28 +00:00
he fd961c4429 Add a new socket option for unix domain sockets: LOCAL_PEEREID, to make
it possible to get the pid, euid and egid of the process at the remote
end at the time it did bind() or connect().

Add a new libc function, getpeereid() to easily get at the euid and egid.
As a consequence, bump libc's minor number.

Document the LOCAL_PEEREID socket option in unix(4).

Based on contribution by Arne H. Juul, minor modifications by myself.
2007-08-09 15:23:01 +00:00
ad c3f8e2ee55 Change the signature of _lwp_park() to accept an lwpid_t and second
hint pointer, but do so in a way that remains compatible with older
pthread libraries. This can be used to wake another thread before the
calling thread goes asleep, saving at least one syscall + involuntary
context switch. This turns out to be a fairly large win on the condvar
benchmarks that I have tried.
2007-08-07 19:04:21 +00:00
kristerw 1ef79ebc7d Do not include SSP files unless _FORTIFY_SOURCE > 0. 2007-08-02 21:49:09 +00:00
pooka b50bf77666 _PATH_PUFFS 2007-07-17 10:14:33 +00:00
pooka 060d8639e3 add estrndup() 2007-07-01 21:41:16 +00:00
rmind 597004aa18 Fix the C99 restrict keyword with array defintion in prototype problem.
http://mail-index.netbsd.org/tech-userlevel/2007/06/17/0004.html
Closes PR/36451.
2007-06-30 16:36:35 +00:00
christos 2b3b97e3ff - Misc cleanups to make the code more readable.
- Detect if we are compiling in libc and provide the appropriate name.
2007-06-03 17:41:19 +00:00
tls dc99372be9 Match usage of FORTIFY_SOURCE on other platforms by not requiring special
include path: the normal header files now include the "SSP" ones (which one
should note are not really named right: SSP and FORTIFY_SOURCE are independent
features).

Disable USE_SSP on targets where the compiler doesn't support it at all
(mips, alpha) or it's known broken (sh3).  But enable FORTIFY_SOURCE,
without SSP, on those platforms -- tested on mipsel.
2007-05-30 21:14:35 +00:00
tls 2368dc663d Move FORTIFY_SOURCE implementation from the somewhat ill-named "libssp"
(what other systems keep in libssp, we already have in libc) into libc
to match what other systems with FORTIFY_SOURCE do.  Goodbye, libssp
dependency in libraries and executables.  Discussed with christos and
mrg; Christos will merge the headers to get us the rest of the way to a
FORTIFY_SOURCE implementation that works as others' code expects.
2007-05-30 01:13:14 +00:00
christos 2f776ce02e Move .db files for services and netgroup to /var/db per gimpy's request. 2007-05-10 17:45:50 +00:00
rmind f867968153 - Add linkage for C++
- KNF

Patch from <ad>, thanks!
2007-05-03 21:22:33 +00:00
rmind 0994dd0691 - Create sysctl nodes for AIO.
- Add POSIX defined system variables and constants of AIO_LISTIO_MAX and
  AIO_MAX values.  Both with _POSIX_ASYNCHRONOUS_IO, provide them in
  sysconf(3) and getconf(1) interfaces.
- Clean up sysconf(3) for handling sysctl nodes dynamically.
2007-05-01 01:01:25 +00:00
rmind 67d703cf25 Import of POSIX Asynchronous I/O.
Seems to be quite stable. Some work still left to do.

Please note, that syscalls are not yet MP-safe, because
of the file and vnode subsystems.

Reviewed by: <tech-kern>, <ad>
2007-04-30 14:44:28 +00:00
ragge 98e922db67 The alloca() arg type check is broken (cpp do not do string comparisions)
so make it marginally less broken so that it works with other compilers
than gcc.
Probably the check can be removed, I doubt anyone will try to use gcc1
anymore.
2007-04-22 08:21:50 +00:00
ghen f0e38187bd Resolve conflicts. 2007-03-30 19:57:16 +00:00
drochner 7161d089aa -get cabs() and cabsf() out of public view - these are historical and
conflict with C99 functions which are builtins in newer gcc
 (actually, the old cabs() is ABI compatible with the new _complex one
  on i386, but this is purely accidental)
 remove public prototypes and manpages, move the code into a compat
 subdirectory as libc does so that binary compatibility is kept
-add a manpage for the isgreater() etc macros, borrowed from FreeBSD
2007-02-22 22:08:17 +00:00
ad f8e00f41e6 Change _lwp_unpark_all() to return a 'ssize_t'. 2007-02-09 22:54:19 +00:00
ad 34eaab26b0 Sync with changes introduced by merging the newlock2 branch. 2007-02-09 22:13:31 +00:00
drochner a981c4eb78 add the isgreater() at al. comparision macros defined in C99 and SUSv3;
use just the primitive macros for now (identical to FreeBSD/DragonFly)
which don't use gcc internals, the rest can go in after some testing;
addresses PR standards/25520
2007-02-06 17:29:37 +00:00
christos fc500ab7fb Add macros for overflow detection 2007-02-03 23:48:21 +00:00
christos a12ac1f620 remove __SAFE 2007-02-02 23:00:53 +00:00
christos b5861ff385 another merge botch. 2007-01-28 01:48:03 +00:00
christos 9567c94af3 Fix merge botch 2007-01-27 22:33:03 +00:00
christos 0d808c59ee Merge back all our changes. 2007-01-27 21:25:23 +00:00
christos 7315c1563a import files from bind-9-4-0-rc2 2007-01-27 19:49:27 +00:00
ad 4fa8fcbfe1 Add: _lwp_kill, _lwp_detach, _lwp_park, lwp_unpark, _lwp_unpark_all. 2007-01-16 01:36:50 +00:00
christos 33d6b113f2 moved string_to_flags and flags_to_string from ls to libutil. 2006-12-14 19:18:01 +00:00