Commit Graph

1027 Commits

Author SHA1 Message Date
jdp
bfcb757e94 Add stub implementations of pthread_[gs]etconcurrency to libc_r and
libthr.  No changes were made to libpthread by request of deischen,
who will soon commit a real implementation for that library.

PR:		standards/50848
Submitted by:	Sergey A. Osokin <osa@freebsd.org.ru>
MFC after:	1 week
2003-04-20 01:53:13 +00:00
nectar
7368fd714f Revert the definitions of _PW_KEY* to their previous values. There is
at least one consumer outside of libc and pwd_mkdb.
Adjust the versioning in libc and pwd_mkdb accordingly.

named was the application affected, and that fact was first
Reported by:	Zherdev Anatoly <tolyar@mx.ru>

Sponsored by:	DARPA, Network Associates Laboratories
2003-04-18 14:11:17 +00:00
nectar
1f7deaca7a = Implement thread-safe versions of the getpwent(3) and getgrent(3)
family of functions using the new nsdispatch(3) core.  Remove
  arbitrary size limits when using the thread-safe versions.

= Re-implement the traditional getpwent(3)/getgrent(3) functions on
  top of the thread-safe versions.

= Update the on-disk format of the hashed version of the passwd(5)
  databases to allow for versioned entries.  The legacy version is
  `3'.  (Don't ask.)

= Add support for version `4' entries in the passwd(5) database.
  Entries in this format are identical to version 3 entries except
  that all integers are stored as 32-bit integers in network byte
  order (big endian).

= pwd_mkdb is updated to generate both version 3 and version 4
  entries.

Sponsored by:	DARPA, Network Associates Laboratories
2003-04-17 14:15:26 +00:00
nectar
f283471288 = Implement name service switch modules (NSS modules). NSS modules
may be built into libc (`static NSS modules') or dynamically loaded
  via dlopen (`dynamic NSS modules').  Modules are loaded/initialized
  at configuration time (i.e.  when nsdispatch is called and nsswitch.conf
  is read or re-read).

= Make the nsdispatch(3) core thread-safe.

= New status code for nsdispatch(3) `NS_RETURN', currently used to
  signal ERANGE-type issues.

= syslog(3) problems, don't warn/err/abort.

= Try harder to avoid namespace pollution.

= Implement some shims to assist in porting NSS modules written for
  the GNU C Library nsswitch interface.

Sponsored by:	DARPA, Network Associates Laboratories
2003-04-17 14:14:22 +00:00
mdodd
58035fe035 Dynamic object dependency mapping: libmap.
This is an optional feature, disabled by default.

This will be useful to people testing the various POSIX threading
libraries under -CURRENT but can easily serve other needs.
2003-04-07 16:21:26 +00:00
mdodd
19637eaabb - Add setfstab() and getfstab().
- Use the environment variable 'PATH_FSTAB' if set rather than the
  hardcoded '/etc/fstab' (fstab.h:_PATH_FSTAB)
2003-04-07 12:55:00 +00:00
jeff
9edf10dc50 - Define sigwait, sigtimedwait, and sigwaitinfo in terms of
kern_sigtimedwait() which is capable of supporting all of their semantics.
 - These should be POSIX compliant but more careful review is needed before
   we announce this.
2003-03-31 23:30:41 +00:00
tjr
66304631e5 MFp4: Implementations of the wcstof() and wcstold() functions. 2003-03-13 06:29:53 +00:00
das
0d06d6f3be Replace our ancient dtoa/strtod implementation with the gdtoa
package, a more recent, generalized set of routines.  Among the
changes:
- Declare strtof() and strtold() in stdlib.h.
- Add glue to libc to support these routines for all kinds
  of ``long double''.
- Update printf() to reflect the fact that dtoa works slightly
  differently now.

As soon as I see that nothing has blown up, I will kill
src/lib/libc/stdlib/strtod.c.  Soon printf() will be able
to use the new routines to output long doubles without loss
of precision, but numerous bugs in the existing code must
be addressed first.

Reviewed by:	bde (briefly), mike (mentor), obrien
2003-03-12 20:30:00 +00:00
nectar
8d36a6658c Clean up some signed/unsigned issues in the XDR code.
Obtained from:	OpenBSD
2003-03-07 13:19:40 +00:00
peter
5c3d1b66c5 Drop netns from include file installation 2003-03-05 19:21:02 +00:00
nectar
f8f1b5261d Eliminate 19 warnings in libc (at level WARNS=2) of the
`implicit declaration of function' variety.
2003-02-27 13:40:01 +00:00
kan
3f74fbd64e Implement dlinfo() function.
Introdice RTLD_SELF special handle and properly process it within
dlsym() and dlinfo() functions.

The intention is to improve our compatibility with Solaris and
to make a Java port easier.

Partially submitted by:	phantom
2003-02-13 17:47:44 +00:00
alfred
9a7e110c84 Add pthread_attr_getstack() and pthread_attr_setstack().
Submitted by: Craig Rodrigues <rodrigc@attbi.com>
2003-02-10 08:48:04 +00:00
phk
2eb1711d79 Install geom include files. 2003-02-08 13:25:48 +00:00
fjoe
18e39a5676 unifdef -D_THREAD_SAFE 2003-01-24 01:47:55 +00:00
wollman
08097d6800 In the absence of consensus as to implement stubs for these TSH-shaded
routines, remove their declarations.  Even though rwlocks have the same
functions, XBDft does not shade those declarations so I am leaving them in.
(This is probably a bug in the Standard.)
2003-01-23 01:09:43 +00:00
marcel
5499df59fc o Move the contents of <machine/floatingpoint.h> over to
<machine/ieeefp.h> where it belongs.
o  Remove the i386 specific inclusion of <machine/floatingpoint.h>
   from <ieeefp.h>, now that including <machine/ieeefp.h> is enough
   for all architectures.
o  Allow <machine/ieeefp.h> to inline the functions exposed by the
   headers by checking for _IEEEFP_INLINED_ in the MI header. When
   defined, prototypes are not given and it is assumed that the MD
   headers, when inlining only a subset of the functions provide
   prototypes for the functions not being inlined.

Based on patch from: Terry Lambert <tlambert2@mindspring.com>
Tested with: make release.
2003-01-19 06:01:33 +00:00
obrien
aeef5c94de Sync with NetBSD -- sl_add() now returns an int. 2003-01-19 01:16:01 +00:00
billf
7ef98bcf6b MFCrypto: update RFC assigned telnet options (r1.9) 2003-01-18 06:13:57 +00:00
mbr
8e075e7fa8 Implement non-blocking tcp-connections.
Reviewed by:	rwatson
Obtained from:	NetBSD
MFC after:	1 day
2003-01-16 07:13:51 +00:00
tjr
f5da9869f6 Add prototypes for the non-standard _unlocked functions. 2003-01-13 08:41:47 +00:00
tjr
2cebddc184 No need to support UL_GETSIZE and UL_SETSIZE anymore; they are about to be
renamed in RELENG_5_0.
2003-01-08 01:18:13 +00:00
fjoe
50fe4b5e15 pthread_attr_get_np() now takes 'pthread_t' (not 'pthread_t *')
to be consistent with other pthread_XXX functions
2003-01-07 21:43:30 +00:00
tjr
0015a97de0 Rename UL_GETSIZE to UL_GETFSIZE and UL_SETSIZE to UL_SETFSIZE; these are
the names required by 1003.1-2001. The old names are retained for
source compatibility with FreeBSD 5.0 and will be removed before 6.0.
2003-01-04 01:11:49 +00:00
tjr
e398c119b4 Bracket the prototype for ulimit() with __BEGIN_DECLS/__END_DECLS
so that it can be called from C++.
2003-01-04 00:32:18 +00:00
tjr
4f12a6c41e Describe WRDE_NOCMD in the same way that we describe the rest of the flags. 2003-01-03 12:03:38 +00:00
jmallett
388c90374f Implement POSIX grantpt(3) functionality, and add a pt_chown utility (akin
to Solaris, it is in /usr/libexec) to perform the handing over of tty nodes
to the user being granted the pty.

Submitted by:	Ryan Younce <ryany@pobox.com>
Reviewed by:	security-officer@, standards@, mike@
2003-01-02 20:44:41 +00:00
schweikh
c353aec149 Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,
especially in troff files.
2003-01-01 18:49:04 +00:00
obrien
ff31f03a44 Back out the s/int */size_t */ commit.
It makes a difference on 64-bit arches, and no one really wants a 2^64
block size [yet].
2002-12-30 11:12:16 +00:00
simokawa
21e8642ea6 Install /sys/dev/firewire/*.h under /usr/include/dev/firewire
for userland utilities.
2002-12-30 09:45:03 +00:00
mike
be7df1b2a7 o Add typedef for off_t, pid_t, and useconds_t.
o Use useconds_t where appropriate.
o Fix a bug in typedef for uid_t (5.0-R candidate).
2002-12-29 01:07:55 +00:00
tjr
f52003d597 Unbreak for the !__XSI_VISIBLE case when another header that defines
size_t has not been included first.
2002-12-26 14:44:45 +00:00
tjr
9ed5e14b3d Add "restrict" qualifiers to the prototype for wordexp(). 2002-12-26 14:38:27 +00:00
tjr
dc84fecc6f Add the POSIX <wordexp.h> header file.
PR:		13420
2002-12-26 14:30:55 +00:00
tjr
cbdfee6d6f MB_LEN_MAX is not MD, move it to the MI limits.h. 2002-12-22 06:38:45 +00:00
dillon
c2d085eb9b This is David Schultz's swapoff code which I am finally able to commit.
This should be considered highly experimental for the moment.

Submitted by:	David Schultz <dschultz@uclink.Berkeley.EDU>
MFC after:	3 weeks
2002-12-15 19:17:57 +00:00
rwatson
0394af0753 Don't install old LOMAC include files; do install new mac_lomac
include files.

Approved by:	re (jhb)
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-12-03 15:05:32 +00:00
ru
9341fc1865 Align the comment with functionality changes from previous revision.
Approved by:	re
2002-11-25 08:55:50 +00:00
julian
161d9dd6a5 Re-enable installing of Bluetooth include files
Hopefully this time it works right.. Who understands this stuff?
2002-11-21 23:34:57 +00:00
julian
8d1765e5eb Temporarily remove the install of bluetooth include files..
something "VERY WIERD" happens to them during buildworld..
The sources get replaced by symlinks to themselves (!?)
2002-11-21 10:31:11 +00:00
julian
e9759cc31e Populate with bluetooth includes 2002-11-21 00:37:48 +00:00
marcel
f825c4ca1c libc header files are normally in src/include. Therefore, uuid.h has
been repo-copied from src/lib/libc/uuid to src/include. Update the
makefiles.

While in src/include/Makefile, reformat and resort INCS. Reverting
the functional change only involves removing uuid.h.

Pompted by: ru
2002-11-18 07:34:56 +00:00
mike
2f3124e9c2 Fix XSI (X/Open) namespace support. 2002-11-12 14:41:49 +00:00
jmallett
c7d0130b1b Wrap function prototype declarations in __BEGIN_DECLS to do the right thing
with them in non-C cases.

Requested by:	Patrick Hartling <patrick@137.org>
2002-11-05 10:55:16 +00:00
marcel
bc0fc15cfe Implement DCE 1.1 compliant UUID functions. Immediate use of these
functions is expected for uuidgen(1), mca(8) and gpt(8). Given the
generic use of UUIDs beyond the scope of the DCE 1.1 specification,
visibility of the data structure at all levels of the machine,
including firmware and the wish to not create a permanent build-
time FreeBSD-ism for DCE compliant applications by creating a new
library, it was decided that libc would be the least inappropriate
place. Also, because the UUID functions live in libc under IRIX as
well, we have maximized our portability and left as many options
open as possible.

This implementation introduces an extension not found in the
specification: the status parameter is allowed to be a NULL-
pointer. The reason for introducing the extension is because
the status is almost never of any use.

The manpage that's part of this commit is a minimal place-holder
and is further fleshed-out in the near future.

Approved by: re@
Contributed by: Hiten Mahesh Pandya <hiten@unixdaemons.com>
Sponsored by: marcel :-)
Tested on: alpha, i386, ia64
2002-10-30 03:51:00 +00:00
wollman
6da8a280d0 Create a small library function, check_utility_compat(3), to determine
whether a named utility should behave in FreeBSD 4.x-compatible mode
or in a standard mode (default standard).  The configuration is done
malloc(3)-style, with either an environment variable or a symlink.

Update expr(1) to use this new interface.
2002-10-28 00:15:43 +00:00
wollman
2f21e15f81 Update limits and configuration parameters for 1003.1/TC1/D6.
Implement new sysconf keys.  Change the implenentation of
_SC_ASYNCHRONOUS_IO in preparation for the next set of changes.

Move some limits which had been in <sys/syslimits.h> to <limits.h> where
they belong.  They had only ever been in syslimits.h to provide for the
kernel implementation of the CTL_USER MIB branch, which went away with
newsysctl years ago.  (There is a #error in <sys/syslimits.h> which I
will downgrade in the next commit.)
2002-10-27 18:03:02 +00:00
tjr
43c9c8fe43 Correct visibility for v*wscanf(), wcstoll() and wcstoull(). These functions
did not exist in ISO C Amd. 1. Add #ifdef __LONG_LONG_SUPPORTED and lint
comments around wcstoll() and wcstoull().
2002-10-27 11:30:36 +00:00
phantom
51da0bbdd0 Prototype for pthread_attr_get_np(). 2002-10-26 13:58:12 +00:00
rwatson
b12ba102b7 Install mac_partition include files.
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-24 15:25:37 +00:00
markm
2aee74623b Make the first argument of getbsize a size_t* instead of an int*, as this is what the quantity actually is. Fix an easy const while I'm here. 2002-10-23 14:18:07 +00:00
fjoe
af2ad9ee8f fix pthread_suspend/resume_all_np() declarations
Approved by:	deischen
2002-10-22 17:11:49 +00:00
tmm
b5014214f1 Install the include files in sys/dev/ofw. 2002-10-18 15:30:50 +00:00
sam
b1242a881d install "fast ipsec" include files 2002-10-18 04:21:29 +00:00
robert
d229826a0f - Remove the lsearch() and lfind() functions and their manpage from
the compatibility library libcompat.
 - Add new implementations of lsearch() and lfind() which conform to
   IEEE Std 1003.1-2001 to libc.  Add a new manual page for them and
   add them to the makefile.
 - Add function prototypes for lsearch() and lfind() to the search.h
   header.
2002-10-16 14:29:23 +00:00
robert
71bdb030f8 - Remove the old insque() and remque() functions and their manual
page from the compatibility library.
 - Add new implementations of insque() and remque() which conform to
   IEEE Std 1003.1-2001 to libc.  Add a new manual page for them and
   connect them to the build.
 - Add the prototypes of insque() and remque() to the search.h
   header.
2002-10-16 14:00:46 +00:00
bde
905dcbd050 Fixed style bug near $FreeBSD$. VCS ids in copyrights should not be
separated by a blank line.
2002-10-16 07:01:10 +00:00
mike
4ab9739ae1 Correct visibility conditionals for memccpy(), strdup(), and
strtok_r().  Merge conditional prototypes into the regular block.
2002-10-14 20:38:40 +00:00
mike
ae88bba821 o Move forward declaration for struct timespec to a more appropriate
location.
o Don't prototype functions for which we don't have an implementation.
o Add forward declaration for struct __ucontext, previously this was
  forward declared in <sys/signal.h>.
o Add a comment about the size of NSIG.

PR:		35924
Submitted by:	bde
2002-10-14 14:13:37 +00:00
tjr
9c19e7d330 Use a weak reference instead of a macro to make vfscanf an alias
for __vfscanf.
2002-10-14 11:18:21 +00:00
mike
8919314dff Move the _POSIX_VERSION constant from <unistd.h> to <sys/unistd.h>, so
that it can be used in-kernel for a sysctl.
2002-10-13 14:25:01 +00:00
mike
f5f1370441 Assume POSIX/XSI is always visible in the __BSD_VISIBLE case. Fix a
mix-up with siginterrupt().
2002-10-13 00:29:06 +00:00
mike
914f5a2bdd Add restrict type-qualifier. 2002-10-12 16:13:41 +00:00
peter
778eae4000 Zap the early-adopter transition aid before we get into serious
5.0-R territory, as threatened.  This only affects antique 5.0
systems that have not had a 'make world' done for well over a year.
2002-10-11 22:38:17 +00:00
tjr
68b47733d2 Add support for the 6 new C99 struct lconv members dealing with formatting
international monetary values: int_p_cs_precedes, int_n_cs_precedes,
int_p_sep_by_space, int_n_sep_by_space, int_p_sign_posn, int_n_sign_posn.
This should not break existing binaries or LC_MONETARY data files.

Reviewed by:	ache
MFC after:	1 month
2002-10-09 09:19:28 +00:00
mike
b79afcff23 Remove duplicate uninstalled aio.h header. 2002-10-07 21:18:30 +00:00
mike
953061ff0e o Move location of the fpos_t typedef to be closer to other typedefs.
o Add typedef for va_list.
o Add comment about missing restrict type-qualifiers.
o Move vscanf(), vsscanf() and vfscanf() to the C99-visible block.
o Add note about missing backing function for vfscanf().
o Restrict L_cuserid to only older versions of POSIX, and BSD
  namespaces.
o Conditionalize some BSD-specific foo_unlock() macros.
2002-10-06 22:16:12 +00:00
mike
df3f69ffb1 o Use relatively new visibility primitives from <sys/cdefs.h>.
o Add typedef for pid_t.
o Add comment about missing restrict type-qualifier.
o Remove unneeded includes (<sys/_posix.h> and <sys/time.h>).
2002-10-06 21:54:08 +00:00
obrien
e84c61055c Make stpcpy() only visiable w/in __BSD_VISIBLE. 2002-10-05 22:07:28 +00:00
mike
79f55ae42f Fix namespace issues by using visibility conditionals from
<sys/cdefs.h>.  Sort function prototypes.
2002-10-05 05:48:50 +00:00
sam
c6145fa466 install sys/opencrypto include files in /usr/include/crypto 2002-10-04 20:44:28 +00:00
tjr
3db1855e0f Add a placeholder implementation of wcscoll() and wcsxfrm() which gives
locale-sensitive collation only in single-byte locales, and just does
binary comparison for the others with extended character sets.
2002-10-04 03:18:26 +00:00
obrien
073c637f7c Add stpcpy(3). 2002-10-03 19:51:04 +00:00
mike
d779ff6b1f Cope with a GCC bug by using an alternative, but equivalent function
prototype for regexec().

Noticed by: robert
2002-10-03 18:12:03 +00:00
mike
d677b8b297 Fix various style(9) bugs:
o Source ID's in wrong location.
o Space used, instead of tab, after typedef.
o Unaligned function prototype for twalk().

Other changes:
o Add missing const qualifier in tfind().
o Add comment about missing functions.
2002-10-03 06:31:16 +00:00
robert
62f9b18f6f Add the 'restrict' type qualifier to the prototypes of `sigaction',
`sigprocmask', `sigaltstack', and `sigwait' as well as to the
prototypes of the apparantly unimplemented functions `sigtimedwait'
and `sigwaitinfo'.  This complies with IEEE Std 1003.1-2001.
2002-10-02 10:53:44 +00:00
mike
6f8da59056 o Add typedef for size_t.
o Fix regoff_t typedef to not require <sys/types.h> as a prerequisite
  (specifically use `__off_t' instead of `off_t').
o Add restrict type-qualifier to function prototypes.
2002-10-02 07:48:13 +00:00
alfred
d6b9b3d942 Add prototypes for rstat(3) and havedisk(3).
Requested by: kris, Emil Mikulic <emikulic@optushome.com.au>
MFC After: 1 day
2002-10-01 17:59:53 +00:00
ru
a25cb2cb01 test -h is deprecated; use -L instead.
PR:             bin/40846
2002-10-01 13:29:45 +00:00
bde
274d059c20 Merged all interesting difference between the old math.h and the current
one into the latter and removed the former.

This works around the bug that some broken Makefiles add -I.../src/include
to CFLAGS, resulting in the old math.h being preferred and differences
between the headers possibly being fatal.

The merge mainly involves declaring some functions as __pure2 although
they are not yet all strictly free of side effects.

PR:		43544
2002-10-01 11:34:42 +00:00
mike
9cb8afa79a Don't install mqueue.h, since it only makes things harder for porting
software when you provide prototypes for non-existent functions.
2002-09-30 17:14:26 +00:00
eric
15a69a0cf4 Add getopt_long(3).
Obtained from:	NetBSD
Sponsored by:	Apple
2002-09-29 04:14:37 +00:00
tjr
b7083cd58a Remove masking macros for getwc(), putwc(), putwchar() and getwchar().
Although there was nothing wrong with getwc() and putwc(), getwchar()
and putwchar() assumed that <stdio.h> had been included before <wchar.h>,
which is not allowed by the standard.
2002-09-28 07:43:44 +00:00
wollman
9905a306b3 Back down to 1003.2-1992 for the time being -- it is causing too many
headaches for common but deprecated uses of standard utilities.
2002-09-25 01:58:56 +00:00
mike
260479e579 Add forgotten <sys/_types.h> include. Fix some style bugs while I'm
here.

PR: 43326
2002-09-24 17:28:12 +00:00
mike
178cc9741f o Move select() helper macros from <sys/types.h> to <sys/select.h>.
o Include <sys/select.h> from <sys/types.h> in the __BSD_VISIBLE case,
  so applications and base software can be slowly updated.
o Prototype select() in <sys/select.h>.  It was previously only
  prototyped in <unistd.h>.
o Add some XXX's to <sys/types.h>.

Reviewed by: -standards
2002-09-23 17:45:51 +00:00
tjr
a96fc812c3 Add implementations of wscanf() and related functions: fwscanf(), swscanf(),
vfwscanf(), vswscanf(), vwscanf(). As the name suggests, these are wide-
character versions of the scanf() family of functions.
2002-09-23 12:40:06 +00:00
tjr
441dd35939 Add the remaining C99 wide character string to integer conversion functions.
Restrict qualifiers were added to the existing prototypes in <inttypes.h>
and the typedef for wchar_t was removed.
2002-09-22 08:06:45 +00:00
bde
4f42bc29f9 Whitespace cleanup (half for fixing missing whitespace before `__restrict'
again).

Removed the second pair of banal comments about `quot' and `rem'.
2002-09-21 22:05:37 +00:00
bde
afd23e410d Whitespace fixes (mainly for a space instead of a tab after #define). 2002-09-21 21:28:25 +00:00
tjr
a399903ed4 Add implementations of the wprintf() family of functions, which perform
formatted wide-character output.
2002-09-21 13:00:30 +00:00
tjr
d4d7777ee9 Restrict visibility of wcslcat() and wcslcpy() to the __BSD_VISIBLE case. 2002-09-21 08:55:16 +00:00
wollman
60551e08f5 Define constants for those POSIX options and option groups which are
(or would be) implemented (or not) exclusively in user-land.  A threads
expert should check over the values I have set to make sure that they
correctly reflect reality.

Move all sysconf() keys here from <sys/unistd.h> as they are not implemented
in the kernel.  Add new keys from 1003.1-2001 final text.  (Some additional
keys are expected in TC1.)

Add some protection against redundant declarations between <stdlib.h>
and <unistd.h> for some functions which XSI requires in the former and
BSD traditionally declares in the latter.  Restrict qualifiers and other
changes from 1003.1-2001 have not been made to the functions prototyped here.

(3 of 5)
2002-09-21 02:08:32 +00:00
wollman
3b6273dfaf Use new visibility macros. Reorder some disordered declarations. Add
new 1003.1-2001 declarations, commented out in cases where we do not
implement the function.  Note that strtoq() and strtouq() are slated
for deletion in 6.0.  (2 of 5)
2002-09-21 02:03:58 +00:00
wollman
e0dc70e091 Use new visibility macros. (1 of 5) 2002-09-21 02:00:44 +00:00
wollman
d8d5a39838 Make the threatened fts(3) ABI fix. FTSENT now avoids the use of the struct
hack, thereby allowing future extensions to the structure (e.g., for extended
attributes) without rebreaking the ABI.  FTSENT now contains a pointer to the
parent stream, which fts_compar() can then take advantage of, avoiding the
undefined behavior previously warned about.  As a consequence of this change,
the prototype of the comparison function passed to fts_open() has changed
to reflect the required amount of constness for its use.  All callers in the
tree are updated to use the correct prototype.

Comparison functions can now make use of the new parent pointer to access
the new stream-specific private data pointer, which is intended to assist
creation of reentrant library routines which use fts(3) internally.

Not objected to in spirit by: -arch
2002-09-21 01:28:41 +00:00
mike
2304e21090 Fix an error which prevented ssize_t from becoming defined. Add
restrict type-qualifier.
2002-09-20 08:22:48 +00:00
peter
458edebe8b Add dev/iicbus and dev/smbus to LSUBDIRS list 2002-09-19 03:28:52 +00:00
alfred
55ef0ca67d Install _semaphore.h. 2002-09-19 01:13:31 +00:00
mike
686a79f41c style(9): tab after #define. 2002-09-18 22:23:59 +00:00
mike
8b527a6030 o Don't include <nl_types.h>, instead provide a typedef for nl_item.
o Use relatively new visibility primitives to conditionalize some
  constants.
2002-09-18 05:54:25 +00:00
mike
77d98323f6 Move definition of nl_item type to <sys/_types.h>, so that it can be
shared.
2002-09-18 05:51:23 +00:00
mike
21e2fed64f Use relatively new visibility primitives for conditionals. Document
unimplemented functions.
2002-09-18 02:07:08 +00:00
mike
48cf66e196 style(9): line up function names 2002-09-17 22:39:43 +00:00
mike
daf51c23b8 Use the relatively new visibility primitives for conditionals. 2002-09-17 22:25:40 +00:00
peter
3c7c11fd3e Initiate deorbit burn for the i386-only a.out related support. Moves are
under way to move the remnants of the a.out toolchain to ports.  As the
comment in src/Makefile said, this stuff is deprecated and one should not
expect this to remain beyond 4.0-REL.  It has already lasted WAY beyond
that.

Notable exceptions:
gcc - I have not touched the a.out generation stuff there.
ldd/ldconfig - still have some code to interface with a.out rtld.
old as/ld/etc - I have not removed these yet, pending their move to ports.
some includes - necessary for ldd/ldconfig for now.

Tested on: i386 (extensively), alpha
2002-09-17 01:49:00 +00:00
tjr
238ea7422c Add wcstod() as a wrapper around strtod(). It does not handle any characters
that strtod() does not (alternate digit characters, etc. are not handled).
2002-09-15 08:38:51 +00:00
tjr
e63a7cf8b4 Style: tab between #define and macro name. 2002-09-12 23:33:17 +00:00
tjr
69c5d484ee Protect arguments to the putwc and putwchar macros with parens. 2002-09-12 10:27:48 +00:00
tjr
a371cd3f71 Add an implementation of wcsftime() (wide character version of strftime()). 2002-09-11 08:57:11 +00:00
mike
3213d10c61 Conditionalize some objects to match the functions that they are used
with.  Enable `restrict' type-qualifier.
2002-09-11 05:04:06 +00:00
mike
a6dd9197a0 Fix some style bugs:
o Space used instead of a tab after `#define' and `typedef'.
o Sentences not ended with a period.
o Unaligned function names and other spacing issues.
2002-09-10 18:41:45 +00:00
mike
89d2df287d Fix namespace issues by using the relatively new visibility
primitives.
2002-09-10 18:12:16 +00:00
tjr
4d3ff5375a Replace FILE with struct __sFILE in the prototypes for the wide character
I/O functions to avoid having to bring in pollution from <stdio.h>.

Suggested by:	bde
2002-09-10 09:43:28 +00:00
wollman
91fc54b14f Without fixing the namespace issues, add prototypes for the new _Exit()
and qsort_r() functions.  Fix one other missorted declaration.
2002-09-10 02:02:49 +00:00
tjr
fbdbd4df50 Remove the typedef of wctype_t from this header; we don't support the
XSI mistake of making everything from <wctype.h> visible here.
If we did choose to support it, we could just #include <wctype.h>.
2002-09-09 07:17:55 +00:00
mike
f159fe8b29 Solve the <runetype.h> pollution problem by disabling inline
optimizations when a standard has been requested, except when the
inline optimizations are also specifically requested.
2002-09-09 05:38:05 +00:00
mike
1f51bf50aa style(9): line up function names. 2002-09-09 03:52:43 +00:00
tjr
6d330c09f5 Add wcstol() and wcstoul(), based on strtol() and strtoul(). 2002-09-08 13:27:26 +00:00
tjr
1da5db1bd1 Add an implementation of wcstok(), based on strtok_r(). 2002-09-07 08:16:57 +00:00
tjr
58ab355dc3 Add restrict qualifiers to wcsstr()'s arguments. 2002-09-07 03:38:13 +00:00
tjr
e841a730a7 Style: One space between "restrict" qualifier and "*". 2002-09-06 11:24:06 +00:00
mike
838634c022 o Fix namespace scope issues in <ctype.h> by using the relatively new
visibility primitives.
o Implement _tolower() and _toupper() POSIX.1-2001 (XSI) macros in
  <ctype.h>.
o Reduce pollution in <runetype.h> by removing typedefs and using
  implementation namespaced types.
o Add a typedef in <rune.h> to compensate for <runetype.h> losing its
  typedefs.

Reviewed by:	bde
2002-09-06 04:22:54 +00:00
alfred
6ca29ba04d remove #pragma ident 2002-09-04 23:58:23 +00:00
mike
6b443bc289 Now that _BSD_CLK_TCK_ and _BSD_CLOCKS_PER_SEC_ are the same on all
architectures, move the definition directly into <time.h> and finish
the removal of <machine/ansi.h>.
2002-09-03 00:06:58 +00:00
mike
14454c3f09 Be more explicit about a namespace by using the relatively new
visibility primitives.
2002-09-01 17:57:20 +00:00
tjr
a54a864f42 Add restrict qualifiers to the arguments of mbstowcs, mbtowc() and
wcstombs().
2002-09-01 07:08:22 +00:00
mike
2bddbca3f6 Add time_t typedef for POSIX compatibility, move an include. 2002-08-24 00:11:52 +00:00
peter
86e60b1181 Use sys/nlist_aout.h for shared-with-kernel definitions. 2002-08-22 20:37:57 +00:00
peter
725774589c Use sys/link_elf.h or sys/link_aout.h based on compile environment 2002-08-22 20:37:30 +00:00
mike
5d0fbddc4d o Merge <machine/ansi.h> and <machine/types.h> into a new header
called <machine/_types.h>.
o <machine/ansi.h> will continue to live so it can define MD clock
  macros, which are only MD because of gratuitous differences between
  architectures.
o Change all headers to make use of this.  This mainly involves
  changing:
    #ifdef _BSD_FOO_T_
    typedef	_BSD_FOO_T_	foo_t;
    #undef _BSD_FOO_T_
    #endif
  to:
    #ifndef _FOO_T_DECLARED
    typedef	__foo_t	foo_t;
    #define	_FOO_T_DECLARED
    #endif

Concept by:	bde
Reviewed by:	jake, obrien
2002-08-21 16:20:02 +00:00
tjr
260d9ffb0f Restrict visibility of wcwidth() and wcswidth(); they are XSI extensions. 2002-08-20 22:44:40 +00:00
ache
eee039d5de Sort unsorted prototypes 2002-08-19 21:00:13 +00:00
ache
7b5c1dee36 Activate (uncomment) wcwidth() and wcswidth() now implemented 2002-08-19 20:48:18 +00:00
ache
c3f06cc0f0 Move internal defines from here to libc/locale/wcwidth.c 2002-08-19 08:58:51 +00:00
ache
8ca3309a23 Properly define SWIDTH1, add autowidth (was SWIDTH1) 2002-08-19 08:50:41 +00:00
tjr
a4e0bb4130 Implement the ISO C90 Amd.1 restartable wide and multibyte character
manipulation functions mbrlen(), mbrtowc(), mbsinit(), mbsrtowcs(),
wcrtomb(), wcsrtombs().
2002-08-18 06:30:10 +00:00
mike
b076b0ba43 Change a POSIX conditional to use the new __BSD_VISIBLE macro.
Fix the following style bugs:
o #ifdef, #ifndef, and #undef should be followed by a space, not a
  tab.
o The second level of indentation in prototypes is 4 characters even
  when the function names are indented 1 extra character.
o Type qualifiers that appear next to a * need a seperating space so
  that the qualifier isn't easily confused with parameter names.
  (eg. `char * __restrict' instead of `char *__restrict')

Submitted by:	bde (mostly)
2002-08-16 16:34:26 +00:00
keichii
1e5d29c50a Add swidth definition for wchar stuff
Submitted by:	clkao@clkao.org
Reviewed by:	keichii
Obtained from:	NetBSD
MFC after:	1 month
2002-08-16 13:42:59 +00:00
alfred
854bbf0f24 add a check for GNUC < 3 to typedef bool because gcc 3 always seems to
define it.

Suggested by: tjr
2002-08-16 07:33:14 +00:00
robert
0ed84d70ad - For compliance with IEEE Std 1003.1-2001, add the 'restrict'
qualifier to function prototypes and definitions where
   appropriate using the '__restrict' macro.
 - Update the manual page.
2002-08-15 10:28:52 +00:00
robert
b0383fce7a - Introduce the 'restrict' qualifier to function prototypes and
definitions to comply with IEEE Std 1003.1-2001.
 - Update the manual pages.
2002-08-15 09:47:10 +00:00
robert
4b216b48b0 - Add the 'restrict' qualifier to the function prototypes and
definitions of the functions that convert strings to numbers
   and are defined by IEEE Std 1003-1.2001.
 - Use ANSI-C function definitions for all of the functions
   mentioned above plus strtouq and strtoq.
 - Update the prototypes in the manual pages.
2002-08-15 09:25:04 +00:00
robert
d844847716 - Add the 'restrict' qualifier to the function definitions and
public prototypes of setbuf(3) and setvbuf(3) using the
   '__restrict' macro from <sys/cdefs.h> to be compliant with
   IEEE Std 1003.1-2001.
 - Replace the K&R with ANSI-C function definitions.
 - Bring the manual page up-to-date.
2002-08-14 23:45:42 +00:00
robert
3a77f79d44 - Add the 'restrict' qualifier to the function definition of
strftime(3) for IEEE Std 1003.1-2001 compliance and remove
   excessive usage of the 'const' qualifier that was neither
   present in the prototype in the publice header, nor in the
   local prototype just above the function definition.
 - Replace the K&R function definition with a ANSI-C one.
 - Update the prototype of strftime(3) in its manual page.
2002-08-14 23:20:48 +00:00
robert
78711cadb9 - Add the C99 'restrict' qualifier using the '__restrict' macro to
function prototype and definition of strptime(3).
 - Update the manual page.
2002-08-14 22:36:22 +00:00
robert
f1b53f4d95 - Add the 'restrict' qualifier to match the IEEE Std 1003.1-2001
prototype of the tdelete(3) function.
 - Remove duplicated space.
 - Use an ANSI-C function definition for tdelete(3).
 - Update the manual page.
2002-08-14 21:16:41 +00:00
robert
3a82d49c05 -Add the restrict required by IEEE Std 1003.1-2001 in form
of our __restrict macro to the prototypes and function
   definitions of inet_pton and inet_ntop.
 - Use ANSI-C function argument lists.
 - Adjust the prototypes in the manual page.
2002-08-14 20:40:35 +00:00
tjr
1b489ba271 Basic support for wide character I/O: getwc(), fgetwc(), getwchar(),
putwc(), fputwc(), putwchar(), ungetwc(), fwide().
2002-08-13 09:30:41 +00:00
mike
18df7c3f79 Implement POSIX.1-2001 (XSI)'s ulimit(3).
Submitted by:	Kyle Martin <mkm@ieee.org>
2002-08-08 04:50:36 +00:00
tjr
1badcfb467 Sort prototypes by function name. 2002-08-06 06:26:06 +00:00
tjr
2d90a237e5 Whitespace formatting changes: line up macro bodies, function names,
place tabs after #define and typedef. Sort typedefs by name.

Requested by:	mike
2002-08-06 05:19:33 +00:00
mike
24b8f9fd0d Fix some style bugs.
Submitted by:	bde
2002-08-05 16:37:05 +00:00
tjr
fb27dc7d9f Implement the missing <wctype.h> functions: isw*() (iswalnum() etc.),
towlower() and towupper() required by ISO C90 Amd. 1.

iswascii(), iswhexnumber(), iswideogram(), iswnumber(), iswphonogram(),
iswrune() and iswspecial() have also been implemented for consistency
with the BSD extensions in <ctype.h>.
2002-08-05 10:45:23 +00:00
mike
4a94c14eee Implement POSIX.1-2001 (XSI)'s fmtmsg(3). 2002-08-05 06:49:58 +00:00
tjr
20a53a858b Change wctype_t to an unsigned type to avoid warnings. 2002-08-04 12:43:53 +00:00
tjr
cf85691cdb Add the ISO C90 Amd. 1 wctrans(3) and towctrans(3) functions. 2002-08-04 12:09:08 +00:00
tjr
ce6de52497 Add ISO C90 Amd. 1 btowc(3) and wctob(3) functions. 2002-08-03 13:49:55 +00:00
tjr
38509edfd6 Add ISO C90 Amd. 1 wctype(3) and iswctype(3) functions. 2002-08-03 04:18:40 +00:00
rwatson
19881293a0 Install MAC policy include files as part of the normal includes
install.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-08-02 06:56:26 +00:00
mike
5db55598f7 Implement the POSIX.1-2001 (XSI) header, <cpio.h>. 2002-08-01 07:18:38 +00:00
robert
0b0032dd41 Remove duplicated '__BEGIN_DECLS' which obviated compiling
C++ sources that use this header.

Reported by:	Jan Stocker <Jan.Stocker@t-online.de>
2002-07-21 20:37:58 +00:00
mikeh
e18b8b241f Update glob(3) to add all the POSIX required options, specifically:
- add GLOB_NOMATCH return value and use it when we don't get a match
- rename GLOB_ABEND to GLOB_ABORTED and use it instead of returning 1
  in some places
- add GLOB_NOESCAPE flag and retire GLOB_QUOTE to compatibility
  section

Suggestions/advice on correct usage of POSIX defines: wollman
2002-07-17 04:58:09 +00:00
mckusick
cc298d48f4 Change utimes to set the file creation time (for filesystems that
support creation times such as UFS2) to the value of the
modification time if the value of the modification time is older
than the current creation time. See utimes(2) for further details.

Sponsored by:	DARPA & NAI Labs.
2002-07-17 02:03:19 +00:00
wollman
696729239a Support POSIX/SUS ``programming environment'' mistake in confstr(). 2002-07-15 22:21:33 +00:00
wollman
d56638f35a Move _CS_PATH from <sys/unistd.h> to <unistd.h> -- the kernel isn't involved
in confstr() processing.
2002-07-15 21:56:40 +00:00
wollman
fb56e65f4b getopt(3) was also added in 1003.2-1992. 2002-07-15 21:32:45 +00:00
wollman
7df7dac66e Fix visibility:
- symlink() is from 1003.1-2001 and XPG4.2
- fchown() is from 1003.1-2001
- fsync() is from ISO/IEC 9945-1:1995
- confstr() is from 1003.2-1992
2002-07-15 20:33:58 +00:00
wollman
5d3d75ae1a Clean up some of the rather strange structure and ordering of this
file.  Correct visibility conditions and order blocks of declarations
in order of increasing inclusiveness.  Note that [v]snprintf() is now
in ISO C and f{seek,tell}o() are now in POSIX.  Deprecated getw() and
putw() are no longer visible in XSH6 namespace (and should probably
be removed from BSD namespace as well).
2002-07-15 19:38:45 +00:00
alfred
c0938fa2ed clnt_vc_create() has const scalar arguments that wind up being modified,
fix it (make them non-const) and update the associated documentation.

Submitted by: mbr
2002-07-14 23:35:04 +00:00
sobomax
9db499defa Correct _PATH_RCP to be /bin/rcp, not /usr/bin/rcp. 2002-07-14 13:04:15 +00:00
alfred
ba36dcdda0 Add functions allowing for the user to specify a timeout for rpc functions.
Update copyrights to reflect where this code was lifted from. (tirpc '99)

Submitted by: mbr
2002-07-11 16:23:04 +00:00
obrien
177832b30f Don't define wchar_t if we are a C++ compiler.
PR:		31864, 40084
2002-07-09 05:13:30 +00:00
mike
235ee7ee8b Move __offsetof() macro from <machine/ansi.h> to <sys/cdefs.h>. It's
hardly MD, since all our platforms share the same macro.  It's not
really compiler dependent either, but this helps in reducing
<machine/ansi.h> to only type definitions.
2002-07-08 16:43:35 +00:00
markm
309bfd41fa Convince lint via the standard lint-comment /* LONGLONG */ to not
whine about our (valid) "long long" usage.
2002-07-04 11:07:48 +00:00
markm
04849cdafb This header is for Solaris compatibility only (according to David
O'Brien), so add a comment to that effect to remind folks.
2002-07-04 11:05:39 +00:00
wollman
517d9e9de8 The thread-safe time functions appear to have been introduced as of
ISO 9945-1: 1996 (according to the change bars therein), which corresponds
to 1003.1c-1995.  Give them appropriate visibility protection.
2002-06-27 20:18:45 +00:00
wollman
9b0bf8f27a Resort namespace blocks into a more sensible order. Delete a redundant
comment.
2002-06-27 18:40:51 +00:00
imp
b2c50a496f Minor libc internal-only interface change for mapv4v6. 2002-06-26 08:18:42 +00:00
mckusick
0694ff55c2 This commit adds basic support for the UFS2 filesystem. The UFS2
filesystem expands the inode to 256 bytes to make space for 64-bit
block pointers. It also adds a file-creation time field, an ability
to use jumbo blocks per inode to allow extent like pointer density,
and space for extended attributes (up to twice the filesystem block
size worth of attributes, e.g., on a 16K filesystem, there is space
for 32K of attributes). UFS2 fully supports and runs existing UFS1
filesystems. New filesystems built using newfs can be built in either
UFS1 or UFS2 format using the -O option. In this commit UFS1 is
the default format, so if you want to build UFS2 format filesystems,
you must specify -O 2. This default will be changed to UFS2 when
UFS2 proves itself to be stable. In this commit the boot code for
reading UFS2 filesystems is not compiled (see /sys/boot/common/ufsread.c)
as there is insufficient space in the boot block. Once the size of the
boot block is increased, this code can be defined.

Things to note: the definition of SBSIZE has changed to SBLOCKSIZE.
The header file <ufs/ufs/dinode.h> must be included before
<ufs/ffs/fs.h> so as to get the definitions of ufs2_daddr_t and
ufs_lbn_t.

Still TODO:
Verify that the first level bootstraps work for all the architectures.
Convert the utility ffsinfo to understand UFS2 and test growfs.
Add support for the extended attribute storage. Update soft updates
to ensure integrity of extended attribute storage. Switch the
current extended attribute interfaces to use the extended attribute
storage. Add the extent like functionality (framework is there,
but is currently never used).

Sponsored by: DARPA & NAI Labs.
Reviewed by:	Poul-Henning Kamp <phk@freebsd.org>
2002-06-21 06:18:05 +00:00
obrien
18b310d04d Guard definitions for use with C++ code.
Submitted by:	Ed Hall <edhall@yahoo-inc.com>
2002-06-19 06:04:37 +00:00
wollman
a9b3db35d5 Move dillon's time conversion functions to a new header <timeconv.h>.
Since they were never documented and have never appeared in a FreeBSD
release, no repo-copy of the header is done.  This removes namespace
pollution from <time.h>.
2002-06-17 01:42:33 +00:00
wollman
5c501a4208 Clean up a bit of namespace pollution which crept in with the last rev.
Submitted by:	bde
2002-06-17 01:31:25 +00:00
mdodd
fd7ef32831 Restore local bits lost in recent merge from NetBSD. 2002-06-16 08:29:35 +00:00
wollman
b0461d297a Partially fix namespace visibility issues by using new visibility macros.
Some issues still remain, and will require research in old POSIX standards
if we care to get them right.
2002-06-15 23:35:37 +00:00
mike
4ed3a69a51 o Remove include of <sys/types.h>, it adds too much pollution;
instead, add typedefs of only gid_t, time_t, and uid_t.
o Remove an unneeded conditional that hid macros that are in the
  implementation namespace and therefore don't need to be hidden when
  _POSIX_SOURCE is defined.
o Adjust some conditionals for compatibility with X/Open and POSIX.
o Note missing functions getpwnam_r() and getpwuid_r().
2002-06-09 19:39:18 +00:00
phk
bf73b15905 Const poison.
Partially submitted by:	wollman
2002-05-30 21:59:16 +00:00
wollman
3364ca3028 Since POSIX gives us plenary authority to define _t types, change
__dlfunc_t to dlfunc_t to match what I have proposed to the Austin
Group.  (This also makes it easier for applications to store these
values before they decide what to do with them, e.g., in a wrapper
function.)
2002-05-29 19:35:13 +00:00
wollman
c288e4bb76 Reorganize dlfcn.h slightly to separate out XSI and BSD interfaces.
Add new dlfunc() interface, which is a version of dlsym() with a
return type that can be cast to a function pointer without turning
your computer into a frog.

Reviewed by:	freebsd-standards
2002-05-29 16:25:43 +00:00
alfred
12f7b09da5 Assume __STDC__, remove non-__STDC__ code.
Add $FreeBSD$.

Submitted by: keramida
2002-05-28 16:56:14 +00:00
mike
b33397f8e4 Prepend BIG_ENDIAN, BYTE_ORDER, LITTLE_ENDIAN, and PDP_ENDIAN with an
underscore.  This is the preferred form.  Also fix a preprocessor
syntax error in an error-detection section.
2002-05-28 04:32:25 +00:00
deischen
a9cce6c5c3 Reorder prototypes to be in alphabetical order. 2002-05-24 04:35:55 +00:00
deischen
aaf974275f Add the prototypes for pthread_suspend_all_np and pthread_resume_all_np. 2002-05-24 04:33:07 +00:00
jmallett
2835c9d6ba Move _PATH_WALL from dump and shutdown's local pathnames.h to paths.h. 2002-05-17 11:47:12 +00:00
ru
1ada7ca17e Rename includes' to buildincludes'.
Rename `incsinstall' to `installincludes'.
Make `includes' a -j safe shortcut for `buildincludes' + `installincludes'.
`buildincludes' and `installincludes' are SUBDIR friendly, if run directly.
2002-05-15 16:19:54 +00:00
phk
b4b15e8f40 Use explicitly sized fields for the tape format definition.
Sponsored by:	DARPA & NAI Labs.
2002-05-14 06:59:55 +00:00
ru
8e77093d64 Added new bsd.incs.mk which handles installing of header files
via INCS.  Implemented INCSLINKS (equivalent to SYMLINKS) to
handle symlinking include files.  Allow for multiple groups of
include files to be installed, with the powerful INCSGROUPS knob.
Documentation to follow.

Added standard `includes' and `incsinstall' targets, use them
in Makefile.inc1.  Headers from the following makefiles were
not installed before (during `includes' in Makefile.inc1):

	kerberos5/lib/libtelnet/Makefile
	lib/libbz2/Makefile
	lib/libdevinfo/Makefile
	lib/libform/Makefile
	lib/libisc/Makefile
	lib/libmenu/Makefile
	lib/libmilter/Makefile
	lib/libpanel/Makefile

Replaced all `beforeinstall' targets for installing includes
with the INCS stuff.

Renamed INCDIR to INCSDIR, for consistency with FILES and SCRIPTS,
and for compatibility with NetBSD.  Similarly for INCOWN, INCGRP,
and INCMODE.

Consistently use INCLUDEDIR instead of /usr/include.

gnu/lib/libstdc++/Makefile and gnu/lib/libsupc++/Makefile changes
were only lightly tested due to the missing contrib/libstdc++-v3.
I fully tested the pre-WIP_GCC31 version of this patch with the
contrib/libstdc++.295 stuff.

These changes have been tested on i386 with the -DNO_WERROR "make
world" and "make release".
2002-05-12 16:01:00 +00:00
des
4c4c5b5b10 Add some more commonly-used directories and files.
Sponsored by:	DARPA, NAI Labs
2002-05-08 00:37:50 +00:00
des
c4c5be0b1f Spell void * as void * rather than caddr_t. This is complicated by the
fact that caddr_t is often misspelled as char *.

Sponsored by:	DARPA, NAI Labs
2002-04-28 15:18:50 +00:00