Commit Graph

1211 Commits

Author SHA1 Message Date
David Xu
093fcf1694 1. Add function pthread_mutex_setspinloops_np to turn a mutex's spin
loop count.
2. Add function pthread_mutex_setyieldloops_np to turn a mutex's yield
   loop count.
3. Make environment variables PTHREAD_SPINLOOPS and PTHREAD_YIELDLOOPS
   to be only used for turnning PTHREAD_MUTEX_ADAPTIVE_NP mutex.
2007-12-14 06:25:57 +00:00
David Schultz
205bd64894 Implement carg(3) and cargf(3).
Rotting in an old src tree since: March 2005
2007-12-12 23:43:51 +00:00
Michael Bushkov
a59d6a8724 Implementing 'fallback' nsswitch source. 'fallback' source is used
when particular function can't be found in nsswitch-module. For
example, getgrouplist(3) will use module-supplied 'getgroupmembership'
function (which can work in an optimal way for such source as LDAP) and
will fall back to the stanard iterate-through-all-groups implementation
otherwise.

PR:		ports/114655
Submitted by:	Michael Hanselmann <freebsd AT hansmi DOT ch>
Reviewed by:	brooks (mentor)
2007-12-12 10:08:03 +00:00
Poul-Henning Kamp
19d6d0eb9a Only protect the prototypes with #ifndef _ASSERT_H_, the standards
specifically allow changes to the NDEBUG macro between #includes of assert.h
2007-12-01 19:28:13 +00:00
Poul-Henning Kamp
22ac70fcd3 Add missing #ifndef _ASSERT_H_ protection against multiple inclusions 2007-12-01 18:56:50 +00:00
John Birrell
990e94172d Remove some OpenSolaris compatibility stuff now that we're doing it a
different way.
2007-11-28 22:09:12 +00:00
John Birrell
6276af0ff1 Use a forward definition of an opaque structure rather than a void
to avoid a strict alias type check failure in gcc 4.2.
2007-11-20 01:49:00 +00:00
Andrey A. Chernov
70e7b0732a Back out not human readable optimization in prev. commit which shown
to generate 3bytes longer opcode.
2007-11-01 03:18:02 +00:00
Kris Kennaway
2017a7cdfe Add a new "non-portable" mutex type, PTHREAD_MUTEX_ADAPTIVE_NP. This
is also implemented in glibc and is used by a number of existing
applications (mysql, firefox, etc).

This mutex type is a default mutex with the additional property that
it spins briefly when attempting to acquire a contested lock, doing
trylock operations in userland before entering the kernel to block if
eventually unsuccessful.

The expectation is that applications requesting this mutex type know
that the mutex is likely to be only held for very brief periods, so it
is faster to spin in userland and probably succeed in acquiring the
mutex, than to enter the kernel and sleep, only to be woken up almost
immediately.  This can help significantly in certain cases when
pthread mutexes are heavily contended and held for brief durations
(such as mysql).

Spin up to 200 times before entering the kernel, which represents only
a few us on modern CPUs.  No performance degradation was observed with
this value and it is sufficient to avoid a large performance drop in
mysql performance in the heavily contended pthread mutex case.

The libkse implementation is a NOP.

Reviewed by:      jeff
MFC after:        3 days
2007-10-29 21:01:47 +00:00
Warner Losh
ca5c51742b Remove 3rd clause and renumber after getting permission from the
author (quite some time ago).
2007-10-29 00:31:54 +00:00
Andrey A. Chernov
5dfb7ce5fc Micro-optimization of prev. commit, change
(_c < 0 || _c >= 128) to (_c & ~0x7F)
2007-10-27 22:32:27 +00:00
Andrey A. Chernov
eb75c0a0d0 Small improvement for __isctype(): don't use __mb_sb_limit but
hardcode 128 here instead, since default locale never define anything
above 127 char.
2007-10-27 09:32:32 +00:00
Andrey A. Chernov
ce0d9ca3db Back out iswascii change from prev. commit, iswascii was right,
some overlook from me.
2007-10-14 10:23:54 +00:00
Andrey A. Chernov
367ed4e13d The problem is: currently our single byte ctype(3) functions are broken
for wide characters locales in the argument range >= 0x80 - they may
return false positives.

Example 1: for UTF-8 locale we currently have:
iswspace(0xA0)==1 and isspace(0xA0)==1
(because iswspace() and isspace() are the same code)
but must have
iswspace(0xA0)==1 and isspace(0xA0)==0
(because there is no such character and all others in the range
0x80..0xff for the UTF-8 locale, it keeps ASCII only in the single byte
range because our internal wchar_t representation for UTF-8 is UCS-4).

Example 2: for all wide character locales isalpha(arg) when arg > 0xFF may
return false positives (must be 0).
(because iswalpha() and isalpha() are the same code)

This change address this issue separating single byte and wide ctype
and also fix iswascii() (currently iswascii() is broken for
arguments > 0xFF).
This change is 100% binary compatible with old binaries.

Reviewied by: i18n@
2007-10-13 16:28:22 +00:00
Ruslan Ermilov
13650420dc Install the forgotten /usr/include/geom/multipath/ header.
Approved by:	re (kensmith)
2007-10-01 18:07:29 +00:00
Pawel Jakub Dawidek
f854db0bf5 Bring in the GEOM Virtualisation class, which allows to create huge GEOM
providers with limited physical storage and add physical storage as
needed.

Submitted by:	Ivan Voras
Sponsored by:	Google Summer of Code 2006
Approved by:	re (kensmith)
2007-09-23 07:34:23 +00:00
Bruce M Simpson
0ad9d01971 Remove old prototypes for addr2ascii() and ascii2addr(), functions which no
longer exist in libc.

Requested by:	Craig Rodrigues
Approved by:	re (kensmith)
2007-08-24 20:25:52 +00:00
Bernd Walter
1b2d5599a5 declare struct tftphdr and embedded union as beeing packed, which is
required for arm.

Tested on:	arm, i386, amd64
Approved by:	re (rwatson)
MFC after:	1 week
2007-08-01 11:59:09 +00:00
Robert Watson
2b851aeb63 Disconnect netatm from the build as it is not MPSAFE and relies on
NET_NEEDS_GIANT, which will shortly be removed.  This is done in a
away that it may be easily reattached to the build before 7.1 if
appropriate locking is added.  Specifics:

- Don't install netatm include files
- Disconnect netatm command line management tools
- Don't build libatm
- Don't include ATM parts in rescue or sysinstall
- Don't install sample configuration files and documents
- Don't build kernel support as a module or in NOTES
- Don't build netgraph wrapper nodes for netatm

This removes the last remaining consumer of NET_NEEDS_GIANT.

Reviewed by:	harti
Discussed with:	bz, bms
Approved by:	re (kensmith)
2007-07-14 21:49:24 +00:00
Bjoern A. Zeeb
9fa28ff687 I4B header files were repo-copied from sys/i386/include to
sys/i4b/include/ so they will be available to all architectures
once I4B compiles on those.

I4B header files are now installed in include/i4b/ and no longer
in include/machine/.

For now we still install the headers for i386 only.

Approved by:	re (kensmith)
2007-07-06 07:20:59 +00:00
Sean Farley
2966d28c32 Significantly reduce the memory leak as noted in BUGS section for
setenv(3) by tracking the size of the memory allocated instead of using
strlen() on the current value.

Convert all calls to POSIX from historic BSD API:
 - unsetenv returns an int.
 - putenv takes a char * instead of const char *.
 - putenv no longer makes a copy of the input string.
 - errno is set appropriately for POSIX.  Exceptions involve bad environ
   variable and internal initialization code.  These both set errno to
   EFAULT.

Several patches to base utilities to handle the POSIX changes from
Andrey Chernov's previous commit.  A few I re-wrote to use setenv()
instead of putenv().

New regression module for tools/regression/environ to test these
functions.  It also can be used to test the performance.

Bump __FreeBSD_version to 700050 due to API change.

PR:		kern/99826
Approved by:	wes
Approved by:	re (kensmith)
2007-07-04 00:00:41 +00:00
George V. Neville-Neil
8409aedfa6 Commit IPv6 support for FAST_IPSEC to the tree.
This commit includes all remaining changes for the time being including
user space updates.

Submitted by:    bz
Approved by:    re
2007-07-01 12:08:08 +00:00
Rong-En Fan
534046e301 - Remove UMAP filesystem. It was disconnected from build three years ago,
and it is seriously broken.

Discussed on:   freebsd-arch@
Approved by:	re (mux)
2007-06-25 05:06:57 +00:00
Xin LI
0bb263df82 Require users to provide a length information for inet_ntoa_r,
this is common on other platforms.

Reported by:	pointyhat via kris
2007-06-14 07:13:28 +00:00
Xin LI
0c927cdd8e Add inet_ntoa_r, a reentrant version of inet_ntoa. This is
available on a lot of platforms, as well as libkern for years.

Submitted by:	"MQ"
2007-06-11 07:21:21 +00:00
Stefan Farfeleder
43b0ef8114 Use tabs after #define.
Obtained from:	NetBSD
Spotted by:	njl
2007-06-11 06:25:19 +00:00
Hidetoshi Shimokawa
41b23fe0b2 Add _PATH_FWMEM for libkvm. 2007-06-11 02:21:18 +00:00
Stefan Farfeleder
47517a7042 Merge NetBSD changes, among them:
el.c 1.44, el.h 1.17, editline.3 1.53, histedit.h 1.31:
# add EL_GETFP, and EL_SETFP.

el.c 1.42, term.c 1.46, term.h 1.18, editline.3 1.52, histedit.h 1.29:
# - Add more readline functions, enough for gdb-6.5
# - Make el_get varyadic, and implement EL_GETTC.
# - XXX: the EL_SETTC api will change in the future.

Note: The latter change breaks the ABI of the el_get() function.

Approved by:	re (kensmith)
2007-06-10 19:06:09 +00:00
Hajimu UMEMOTO
dde4a85d9d Merge BIND 9.4.1 into main chunk.
MFC after:	2 weeks
2007-06-03 17:20:27 +00:00
Andrey A. Chernov
ba174a5e38 Back out all POSIXified *env() changes.
Not because I admit they are technically wrong and not because of bug
reports (I receive nothing). But because I surprisingly meets so
strong opposition and resistance so lost any desire to continue that.

Anyone who interested in POSIX can dig out what changes and how
through cvs diffs.
2007-05-01 16:02:44 +00:00
Andrey A. Chernov
86580aa6fc Fix unsetenv and putenv prototypes to conform Open Group specs Issue 6
(also IEEE Std 1003.1-2001)
2007-04-30 02:27:43 +00:00
Pawel Jakub Dawidek
0fdce72711 Install only types.h from sys/rpc/.
Requested by:		ache
Explained how by:	ru
2007-04-13 01:39:33 +00:00
Pawel Jakub Dawidek
7f64b05f79 Move rpc/types.h under sys/, as this is used by ZFS kernel module.
Repo-copied by:	simon
2007-04-10 22:10:16 +00:00
Pawel Jakub Dawidek
f3fdfb670c - Remove SEEK_DATA and SEEK_HOLE from stdio.h, they don't belong here.
- Only define SEEK_DATA and SEEK_HOLE in sys/unistd.h when neither
  _POSIX_SOURCE nor _XOPEN_SOURCE is defined.

Pointed out by:	bde, ache
2007-04-07 16:02:30 +00:00
Pawel Jakub Dawidek
f6521d1c31 Implement SEEK_DATA and SEEK_HOLE extensions to lseek(2) as found in
OpenSolaris. For more information please refer to:

	http://blogs.sun.com/bonwick/entry/seek_hole_and_seek_data
2007-04-05 21:10:53 +00:00
Kirk McKusick
772ad651bf Update the dump program to save extended attributes. Update
the restore program to restore all dumped extended attributes.

If the restore is running as root, it will always be able
to restore all extended attributes. If it is not running
as root, it makes a best effort to set them. Using the -v
command line flag or the `verbose' command in interactive
mode will display all the extended attributes being set on
files (and at the end on directories) that are being restored.
It will note any extended attributes that could not be set.

The extended attributes are placed on the dump image immediately
following each file's data. Older versions of restore can work
with the newer dump images. Old versions of restore will
correctly restore the file data and then (silently) skip
over the extended attribute data and proceed to the next file.

This resolves PR 93085 which will be closed once the code
has been MFC'ed.

Note that this code will not compile until these header
files have been updated: <protocols/dumprestore.h> and
<sys/extattr.h>.

PR:		bin/93085
Comments from:	Poul-Henning Kamp and Robert Watson
MFC after:	3 weeks
2007-02-26 08:15:56 +00:00
Craig Rodrigues
d139ce67c0 Makefile changes to reflect moving sys/isofs/cd9660 to sys/fs/cd9660.
Continue to install userland include files in /usr/include/isofs/cd9660
so as not to break userland applications such as libstand.
2007-02-11 14:01:32 +00:00
Jens Schweikhardt
e8117c82f6 Properly parenthesize the __tg_is_complex() macro by moving a closing
paren to where it belongs.

MFC after:	7 days
2007-02-02 18:30:23 +00:00
Jens Schweikhardt
8011e03458 Comment the token after #endif, like we do everywhere else.
Static analyzers like FlexeLint complain about it.

MFC after:	7 days
2007-02-02 18:11:18 +00:00
Peter Wemm
401a7f6f1b Oops, remove an objformat.h reference. 2007-01-25 22:38:04 +00:00
Peter Wemm
8182cee74a Remove more a.out strays, as threatened in 2002. 2007-01-25 22:34:22 +00:00
David Xu
6a274b2b01 Add function __mq_oshandle() to get file handle of a mqueue. 2007-01-06 11:30:04 +00:00
Hajimu UMEMOTO
2cd19db26a Merge BIND9 9.3.3 into main chunk.
Obtained from:	ISC
MFC after:	1 week
2006-12-15 20:59:55 +00:00
Pawel Jakub Dawidek
143943aa35 Forgot to commit this file: add definition for _SC_PHYS_PAGES. 2006-12-14 21:42:03 +00:00
Joseph Koshy
9e1ea8f2fe Attempt to improve application portability by marking `struct ar_hdr'
as `packed'.

The C standard leaves the alignment of individual members of a C
struct upto the implementation, so pedantically speaking portable
code cannot assume that the layout of a `struct ar_hdr' in memory
will match its layout in a file.  Using a __packed attribute
declaration forces file and memory layouts for this structure to
match.

Submitted by:	ru
2006-11-13 04:28:29 +00:00
Tom Rhodes
6aeb05d7be Merge posix4/* into normal kernel hierarchy.
Reviewed by:	glanced at by jhb
Approved by:	silence on -arch@ and -standards@
2006-11-11 16:26:58 +00:00
Pawel Jakub Dawidek
f348204c94 Hook up gjournal bits to the build.
Sponsored by:	home.pl
2006-10-31 22:22:30 +00:00
Ruslan Ermilov
04c7da702f A GEOM cache can speed up read performance by sending fixed size
read requests to its consumer.  It has been developed to address
the problem of a horrible read performance of a 64k blocksize FS
residing on a RAID3 array with 8 data components, where a single
disk component would only get 8k read requests, thus effectively
killing disk performance under high load.  Documentation will be
provided later.  I'd like to thank Vsevolod Lobko for his bright
ideas, and Pawel Jakub Dawidek for helping me fix the nasty bug.
2006-10-06 08:27:07 +00:00
John Birrell
3c3f6fd0cf Include the Solaris compatibility definions iff _SOLARIS_C_SOURCE is defined. 2006-10-04 07:25:55 +00:00
Maksim Yevmenkin
1cda541cf5 Prepare for upcoming bthidd(8) update. Install vkbd(4) header into dev/vkbd.
MFC after:	1 month
2006-09-07 18:24:24 +00:00
Maxim Sobolev
e5d34218fb Add device to access and modify Open Firmware NVRAM settings in
PowerPC-based Apple's machines and small utility to do it from
userland modelled after the similar utility in Darwin/OSX.

Only tested on 1.25GHz G4 Mac Mini.

MFC after:	1 month
2006-08-01 22:19:01 +00:00
Jason Evans
78a6842d2f Add __{BEGIN,END}_DECLS macros, so that function prototypes remain
unmangled for C++ programs.

Submitted by:	Niklas Sorensson <nik@cs.chalmers.se>
2006-06-30 20:57:41 +00:00
Andrey A. Chernov
d61b5f8ac7 Add size_t declaration 2006-05-22 05:57:39 +00:00
Andrey A. Chernov
fa9ad9461a Make gl_offs size_t too, as required by POSIX
Make non-standard gl_matchc in the similar fashion as gl_pathc size_t too,
like done in NetBSD & others
2006-05-22 05:39:57 +00:00
Andrey A. Chernov
de7ac8d19c Use size_t for gl_pathc as asked in the libc's Makefile:
# If you bump SHLIB_MAJOR, see standards/55112.

PR:             55112
Reviewed by:    ume
2006-05-22 05:10:17 +00:00
Hajimu UMEMOTO
1bdf356bd3 Fix gethostbyaddr() prototype to conform to IEEE Std 1003.1 on 64 bit
arch.

X-MFC after:	never
2006-05-21 11:27:28 +00:00
Hajimu UMEMOTO
734aa10414 Return EAI_OVERFLOW instead of EAI_MEMORY when the supplied buffer is
too short.  This conforms to RFC3493, POSIX and XPG6.

Obtained from:	NetBSD
2006-05-21 11:22:31 +00:00
Hajimu UMEMOTO
d808369aa1 Upgrade res_update(3) and the friends to BIND9's one excluding TSIG
support.

X-MFC after:	never
2006-05-21 11:19:36 +00:00
Hajimu UMEMOTO
2d39807f07 Comment out the function prototypes which our libc actually
doesn't have.
2006-05-13 12:43:12 +00:00
Hajimu UMEMOTO
3da59cd007 Fix gethostbyaddr() prototype to conform to IEEE Std 1003.1:
http://www.opengroup.org/onlinepubs/009695399/functions/gethostbyaddr.html

gethostbyaddr_r() is changed as well.
It breaks ABI backward compatibility on 64 bit arch.  So, we fix it
on 32 bit arch only for now.

Reported by:	Rostislav Krasny <rosti.bsd@gmail.com>
2006-05-12 15:37:23 +00:00
Hajimu UMEMOTO
0e3a96aae0 English grammar fix in comment.
Submitted by:	keramida
2006-04-29 04:26:16 +00:00
Hajimu UMEMOTO
06a99fe36f - Extend the nsswitch to support Services, Protocols and Rpc
databases.
- Make nsswitch support caching.

Submitted by:	Michael Bushkov <bushman__at__rsu.ru>
Sponsored by:	Google Summer of Code 2005
2006-04-28 12:03:38 +00:00
Daniel Eischen
28c94ec4cb Add a prototype for fcloseall(). 2006-04-22 15:10:11 +00:00
Hajimu UMEMOTO
d3ac2b30d4 - make reentrant version of netdb functions glibc style API, and
expose them to outside of libc.
- make netdb functions NSS friendly.

Reviewed by:	arch@ and current@ (no objection)
2006-04-15 16:20:27 +00:00
John Birrell
992879a026 Copy the new CLOCK_ defines from sys/time.h for SUSv3 compatibility.
Approved by: rwatson
2006-04-15 03:08:55 +00:00
Hajimu UMEMOTO
eb27a220f8 Expose res_update and friends again. At least, ports/mail/spamilter
uses them.
Now, we have res_nupdate and res_nmkupdate as well, but they are
still based on our old resolver for binary backward compatibility.
So, they don't provide new features such as TSIG support.

Reported by:	pointyhat via kris
2006-03-30 20:15:53 +00:00
Jason Evans
6b2c15da6a Add malloc_usable_size(3).
Discussed with:		arch@
2006-03-28 22:16:04 +00:00
Hajimu UMEMOTO
5342d17f09 Update the resolver in libc to BIND9's one.
Since, res_sendsigned(3) and the friends use MD5 functions, it is
hard to include them without having MD5 functions in libc.  So,
res_sendsigned(3) is not merged into libc.

Since, res_update(3) in BIND9 is not binary compatible with our
res_update(3), res_update(3) is leaved as is, except some
necessary modifications.
The res_update(3) and the friends are not essential part of the
resolver.  They are not defined in resolv.h but defined in
res_update.h separately in BIND9.  Further, they are not called from
our tree.  So, I hide them from our resolv.h, but leave them only
for binary backward compatibility (perhaps, no one calls them).

Since, struct __res_state_ext is not exposed in BIND9, I hide it
from our resolv.h.  And, global variable _res_ext is removed.  It
breaks binary backward compatibility.  But, since it is not used from
outside of our libc, I think it is safe.

Reviewed by:	arch@ (no objection)
2006-03-21 16:11:11 +00:00
Ruslan Ermilov
cea557add0 Extend coverage of the MK_IPX build option to the following:
- <netipx> headers [1]
- IPX library (libipx)
- IPX support in ifconfig(8)
- IPXrouted(8)
- new MK_NCP option

New MK_NCP build option controls:

- <netncp> and <fs/nwfs> headers
- NCP library (libncp)
- ncplist(1) and ncplogin(1)
- mount_nwfs(8)
- ncp and nwfs kernel modules

User knobs: WITHOUT_IPX, WITHOUT_IPX_SUPPORT, WITHOUT_NCP.

[1] <netsmb/netbios.h> unconditionally uses <netipx> headers
so they are still installed.  This needs to be dealt with.
2006-03-20 14:24:58 +00:00
Robert Watson
013f1b341e Merge Perforce change 93569 from TrustedBSD audit3 branch:
Do install sys/security/audit include files.  It would be nice just
  to install audit_ioctl.h, but we seem only to support installing
  directories, so we get them all.  The two not intended for extra-
  kernel use have !_KERNEL #error's, which should help.

Obtained from:	TrustedBSD Project
2006-03-19 15:44:53 +00:00
Ruslan Ermilov
e1fe3dba5c Reimplementation of world/kernel build options. For details, see:
http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html

The src.conf(5) manpage is to follow in a few days.

Brought to you by:	imp, jhb, kris, phk, ru (all bugs are mine)
2006-03-17 18:54:44 +00:00
Andre Oppermann
c74dfa2faf Import of OpenBSD's strtonum(3) which is a nicer version of strtoll(3)
providing proper error checking and other improvements.

Obtained from:	OpenBSD
Requested by:	flz (to port Open[BGP|OSPF]D)
MFC after:	3 days
2006-03-14 16:57:30 +00:00
Ruslan Ermilov
5f0c9ae10a Hopefully fix all nearby style bugs that Bruce has mentioned. 2006-03-10 11:07:39 +00:00
Ruslan Ermilov
6549999b97 - Fix variable assignment to be portable.
- "Line up" continuations.

Submitted by:	bde
2006-03-10 11:00:11 +00:00
Hajimu UMEMOTO
a18487548f ns_name_skip was not prefixed by `__'.
Obtained from:	BIND9
2006-03-09 03:47:11 +00:00
Poul-Henning Kamp
f3fede8ab9 Add nested include of <wchar.h> 2006-03-02 10:01:52 +00:00
Daniel Eischen
0411773be7 Const'ify arguments to a couple of functions to fix breakage
with -O2.
2006-02-28 16:02:26 +00:00
Hajimu UMEMOTO
f9ad25aace Decrease the value of RES_DFLRETRY from 4 to 2.
PR:		bin/62139
Reported by:	Rostislav Krasny <rosti.bsd__at__gmail.com>
Obtained from:	BIND9
MFC after:	1 week
2006-02-24 17:00:50 +00:00
David Xu
d56a014b6e Introduce a new proc service routine ps_linfo() to get LWP info. 2006-02-07 02:29:55 +00:00
Poul-Henning Kamp
8dcefe6112 Remove spurious "union arg" from printf.h
Make sure to always print something in the alternate time format.
2006-02-04 14:35:01 +00:00
Stefan Farfeleder
3acb8d3f94 Analogous to __printflike and __scanflike, add the macro __format_arg which
expands to the GCC format_arg attribute if supported.

This fixes a syntax error in <nl_types.h> for compilers/tools not
implementing the GCC __attribute__ extensions.
2006-01-26 20:53:40 +00:00
Poul-Henning Kamp
6dbacee284 Make the %V{is} extension handle a NULL pointer like %s does: output "(null)"
Add %M{essage} extension which prints an errno value as the
corresponding string if possible or numerically otherwise.

It is not currently possible to do the syslog(3) like %m extension
because errno would need to get capatured on entry to the first
function in the printf family, so %M requires you to supply errno
as an argument.

Add %Q{uote} extension which will print a string in double quotes with
appropriate back-slash escapes (only) if necessary.
2006-01-25 12:45:24 +00:00
Jason Evans
b3d51d3afc Expose the posix_memalign() prototype, now that the function is implemented
by libc.
2006-01-12 07:58:59 +00:00
Doug Rabson
c0b9f4fe65 Add a new extensible GSS-API layer which can support GSS-API plugins,
similar the the Solaris implementation. Repackage the krb5 GSS mechanism
as a plugin library for the new implementation. This also includes a
comprehensive set of manpages for the GSS-API functions with text mostly
taken from the RFC.

Reviewed by: Love Hörnquist Åstrand <lha@it.su.se>, ru (build system), des (openssh parts)
2005-12-29 14:40:22 +00:00
Tom Rhodes
257551c6a0 Add a64l(), l64a(), and l64a_r() XSI extentions. These functions convert
between a 32-bit integer and a radix-64 ASCII string.  The l64a_r() function
is a NetBSD addition.

PR:		51209 (based on submission, but very different)
Reviewed by:	bde, ru
2005-12-24 22:37:59 +00:00
Poul-Henning Kamp
866196b69d Add abort2() prototype 2005-12-23 12:28:10 +00:00
Alexander Kabaev
0eb88f2029 Implement ELF symbol versioning using GNU semantics. This code aims
to be compatible with symbol versioning support as implemented by
GNU libc and documented by http://people.redhat.com/~drepper/symbol-versioning
and LSB 3.0.

Implement dlvsym() function to allow lookups for a specific version of
a given symbol.
2005-12-18 19:43:33 +00:00
Poul-Henning Kamp
75067f4f70 Add an extensible version of our *printf(3) implementation to libc
on probationary terms:  it may go away again if it transpires it is
a bad idea.

This extensible printf version will only be used if either
    environment variable USE_XPRINTF is defined
or
    one of the extension functions are called.
or
    the global variable __use_xprintf is set greater than zero.

In all other cases our traditional printf implementation will
be used.

The extensible version is slower than the default printf, mostly
because less opportunity for combining I/O operation exists when
faced with extensions.  The default printf on the other hand
is a bad case of spaghetti code.

The extension API has a GLIBC compatible part and a FreeBSD version
of same.  The FreeBSD version exists because the GLIBC version may
run afoul of our FILE * locking in multithreaded programs and it
even further eliminate the opportunities for combining I/O operations.

Include three demo extensions which can be enabled if desired: time
(%T), hexdump (%H) and strvis (%V).

%T can format time_t (%T), struct timeval (%lT) and struct timespec (%llT)
   in one of two human readable duration formats:
	"%.3llT" -> "20349.245"
	"%#.3llT" -> "5h39m9.245"

%H will hexdump a sequence of bytes and takes a pointer and a length
   argument.  The width specifies number of bytes per line.
	"%4H" -> "65 72 20 65"
	"%+4H" -> "0000 65 72 20 65"
	"%#4H" -> "65 72 20 65  |er e|"
	"%+#4H" -> "0000 65 72 20 65  |er e|"

%V will dump a string in strvis format.
	"%V" -> "Hello\tWor\377ld"	(C-style)
	"%0V" -> "Hello\011Wor\377ld"	(octal)
	"%+V" -> "Hello%09Wor%FFld"	(http-style)

Tests, comments, bugreports etc are most welcome.
2005-12-16 18:56:39 +00:00
Peter Wemm
7bb2af36b7 Fix ypwhich -m. This should be MFC'ed back at least as far as RELENG_5.
Submitted by: Gil Kloepfer <gil@arlut.utexas.edu>
PR: 64445
2005-12-06 02:01:06 +00:00
David Xu
ea8fe575cd barrier and spin_lock had already been implemented in libpthread and
libthr for a long time, set both _POSIX_BARRIERS and _POSIX_SPIN_LOCKS
to 200112L.
2005-12-02 02:36:13 +00:00
Ruslan Ermilov
1332b4bd91 Install the mqueue.h header. 2005-12-01 21:46:01 +00:00
David Xu
1f4ae9be57 Fix compiling for c++, include cdefs.h. 2005-11-30 07:26:36 +00:00
Craig Rodrigues
a8c06a09c4 Remove commented out reference to posix4/mqueue.h. It hasn't been installed
for 3 years, and now we have another (working) implementation
of POSIX message queues elsewhere in the source tree.
2005-11-28 03:21:58 +00:00
David Xu
c6678cae14 Bring in POSIX message queue header file. 2005-11-26 12:55:36 +00:00
Ruslan Ermilov
52fbcc15a0 Revert last revision, strmode() should be moved to <unistd.h> to be
properly fixed.
2005-11-24 08:30:44 +00:00
Ruslan Ermilov
20d91f5626 Fix prototype to match the code and documentation. 2005-11-24 07:20:26 +00:00
Ruslan Ermilov
fee45c0c38 Fix prototype of strmode() to match the code and documentation. 2005-11-24 06:59:35 +00:00
Xin LI
b0f3cf4492 Since speaker.h now lives in sys/dev/speaker, reflect this fact here. 2005-11-11 16:48:01 +00:00
David Xu
bd3e40ce72 Add POSIX timer interfaces. 2005-10-30 03:15:05 +00:00
David Xu
02ea638732 Add prototype for following functions, plus tab fixes.
pthread_condattr_getpshared
	pthread_condattr_setpshared
	pthread_mutexattr_getpshared
	pthread_mutexattr_setpshared
2005-10-24 05:53:54 +00:00