Commit graph

1041 commits

Author SHA1 Message Date
Tim J. Robbins 56f562526c Add the POSIX <wordexp.h> header file.
PR:		13420
2002-12-26 14:30:55 +00:00
Tim J. Robbins b30a7779d4 MB_LEN_MAX is not MD, move it to the MI limits.h. 2002-12-22 06:38:45 +00:00
Matthew Dillon 92da00bb24 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
Robert Watson dbd8d5b2dd 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
Ruslan Ermilov 605a327e7b Align the comment with functionality changes from previous revision.
Approved by:	re
2002-11-25 08:55:50 +00:00
Julian Elischer 16d7acae14 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 Elischer 04c021fe6e 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 Elischer 8f5271e78a Populate with bluetooth includes 2002-11-21 00:37:48 +00:00
Marcel Moolenaar c544e42bcf 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 Barcroft 41eaee750b Fix XSI (X/Open) namespace support. 2002-11-12 14:41:49 +00:00
Juli Mallett 7a9b006d78 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 Moolenaar 65393a863e 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
Garrett Wollman c9885518de 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
Garrett Wollman 188c541ceb 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
Tim J. Robbins 11de836696 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
Alexey Zelkin 49d7a091ac Prototype for pthread_attr_get_np(). 2002-10-26 13:58:12 +00:00
Robert Watson bac8e8742b Install mac_partition include files.
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-24 15:25:37 +00:00
Mark Murray d69d15193c 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
Max Khon 943dffc85d fix pthread_suspend/resume_all_np() declarations
Approved by:	deischen
2002-10-22 17:11:49 +00:00
Thomas Moestl 9f29ec17e0 Install the include files in sys/dev/ofw. 2002-10-18 15:30:50 +00:00
Sam Leffler 4b70617d04 install "fast ipsec" include files 2002-10-18 04:21:29 +00:00
Robert Drehmel 6c84d0b1a5 - 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 Drehmel e768c1be41 - 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
Bruce Evans 0dfac89ae3 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 Barcroft 32484af1c4 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 Barcroft ed583c2855 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
Tim J. Robbins af1c9c0e4d Use a weak reference instead of a macro to make vfscanf an alias
for __vfscanf.
2002-10-14 11:18:21 +00:00
Mike Barcroft d3d0ea18c2 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 Barcroft 3357acdd16 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 Barcroft 54e4e385de Add restrict type-qualifier. 2002-10-12 16:13:41 +00:00
Peter Wemm 74a4ba21f7 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
Tim J. Robbins f4da1a754d 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 Barcroft 5b0f380cdd Remove duplicate uninstalled aio.h header. 2002-10-07 21:18:30 +00:00
Mike Barcroft 5dfca833cf 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 Barcroft eb74223b9f 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
David E. O'Brien 103f8a93cb Make stpcpy() only visiable w/in __BSD_VISIBLE. 2002-10-05 22:07:28 +00:00
Mike Barcroft 4b96f22259 Fix namespace issues by using visibility conditionals from
<sys/cdefs.h>.  Sort function prototypes.
2002-10-05 05:48:50 +00:00
Sam Leffler 3feb456215 install sys/opencrypto include files in /usr/include/crypto 2002-10-04 20:44:28 +00:00
Tim J. Robbins fd4f1dd9fa 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
David E. O'Brien 1d6bd7d717 Add stpcpy(3). 2002-10-03 19:51:04 +00:00
Mike Barcroft 96cb38342d 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 Barcroft a23db95772 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 Drehmel e31d11c36a 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 Barcroft 49ab7b9411 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 Perlstein 0c96d7c634 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
Ruslan Ermilov 7206028152 test -h is deprecated; use -L instead.
PR:             bin/40846
2002-10-01 13:29:45 +00:00
Bruce Evans 219cbe1087 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 Barcroft 793afc3a5b 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 Melville a35a7e761a Add getopt_long(3).
Obtained from:	NetBSD
Sponsored by:	Apple
2002-09-29 04:14:37 +00:00
Tim J. Robbins 3619568a64 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
Garrett Wollman dcbfb460ca 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 Barcroft be6180cf89 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 Barcroft 56144d5a4d 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
Tim J. Robbins 1f4ff8506a 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
Tim J. Robbins 1302dabd28 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
Bruce Evans a4c8a68c86 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
Bruce Evans 5f9a7cb392 Whitespace fixes (mainly for a space instead of a tab after #define). 2002-09-21 21:28:25 +00:00
Tim J. Robbins c5604d0a50 Add implementations of the wprintf() family of functions, which perform
formatted wide-character output.
2002-09-21 13:00:30 +00:00
Tim J. Robbins 7ca9f09d6e Restrict visibility of wcslcat() and wcslcpy() to the __BSD_VISIBLE case. 2002-09-21 08:55:16 +00:00
Garrett Wollman ffb1998145 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
Garrett Wollman 3ecc48e2ea 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
Garrett Wollman f7eb4ce875 Use new visibility macros. (1 of 5) 2002-09-21 02:00:44 +00:00
Garrett Wollman 0d3bcc2e80 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 Barcroft 6b7f7587e3 Fix an error which prevented ssize_t from becoming defined. Add
restrict type-qualifier.
2002-09-20 08:22:48 +00:00
Peter Wemm c7ccd7aab0 Add dev/iicbus and dev/smbus to LSUBDIRS list 2002-09-19 03:28:52 +00:00
Alfred Perlstein fd9c81948b Install _semaphore.h. 2002-09-19 01:13:31 +00:00
Mike Barcroft cd5791c108 style(9): tab after #define. 2002-09-18 22:23:59 +00:00
Mike Barcroft 11142c6f54 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 Barcroft f4a1f909c6 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 Barcroft eb87df47cf Use relatively new visibility primitives for conditionals. Document
unimplemented functions.
2002-09-18 02:07:08 +00:00
Mike Barcroft 7f4e0a8164 style(9): line up function names 2002-09-17 22:39:43 +00:00
Mike Barcroft c1a2075e93 Use the relatively new visibility primitives for conditionals. 2002-09-17 22:25:40 +00:00
Peter Wemm 66422f5b7a 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
Tim J. Robbins 03b716c4bd 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
Tim J. Robbins 18db09bb8e Style: tab between #define and macro name. 2002-09-12 23:33:17 +00:00
Tim J. Robbins 6b3015b6a6 Protect arguments to the putwc and putwchar macros with parens. 2002-09-12 10:27:48 +00:00
Tim J. Robbins 47794211c8 Add an implementation of wcsftime() (wide character version of strftime()). 2002-09-11 08:57:11 +00:00
Mike Barcroft 24c502cbc7 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 Barcroft a30ec216db 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 Barcroft 9ad8e31ee8 Fix namespace issues by using the relatively new visibility
primitives.
2002-09-10 18:12:16 +00:00
Tim J. Robbins 5207d0c8bc 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
Garrett Wollman 0855f655f8 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
Tim J. Robbins 6478b242d6 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 Barcroft 86eedb4ef4 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 Barcroft 006d0ddf67 style(9): line up function names. 2002-09-09 03:52:43 +00:00
Tim J. Robbins 5fd1762445 Add wcstol() and wcstoul(), based on strtol() and strtoul(). 2002-09-08 13:27:26 +00:00
Tim J. Robbins 9ad391340e Add an implementation of wcstok(), based on strtok_r(). 2002-09-07 08:16:57 +00:00
Tim J. Robbins c58bfeb53b Add restrict qualifiers to wcsstr()'s arguments. 2002-09-07 03:38:13 +00:00
Tim J. Robbins 58d38e2520 Style: One space between "restrict" qualifier and "*". 2002-09-06 11:24:06 +00:00
Mike Barcroft 423eb945c0 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 Perlstein b51066c04d remove #pragma ident 2002-09-04 23:58:23 +00:00
Mike Barcroft dd1b6791a8 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 Barcroft 7b8c96a0b6 Be more explicit about a namespace by using the relatively new
visibility primitives.
2002-09-01 17:57:20 +00:00
Tim J. Robbins 9771f1e24e Add restrict qualifiers to the arguments of mbstowcs, mbtowc() and
wcstombs().
2002-09-01 07:08:22 +00:00
Mike Barcroft b36a5d7090 Add time_t typedef for POSIX compatibility, move an include. 2002-08-24 00:11:52 +00:00
Peter Wemm df10150138 Use sys/nlist_aout.h for shared-with-kernel definitions. 2002-08-22 20:37:57 +00:00
Peter Wemm 0685b26b97 Use sys/link_elf.h or sys/link_aout.h based on compile environment 2002-08-22 20:37:30 +00:00
Mike Barcroft abbd890233 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
Tim J. Robbins 71f9b42067 Restrict visibility of wcwidth() and wcswidth(); they are XSI extensions. 2002-08-20 22:44:40 +00:00
Andrey A. Chernov 57788f25b3 Sort unsorted prototypes 2002-08-19 21:00:13 +00:00
Andrey A. Chernov 38eb24cc31 Activate (uncomment) wcwidth() and wcswidth() now implemented 2002-08-19 20:48:18 +00:00
Andrey A. Chernov 153bb33daf Move internal defines from here to libc/locale/wcwidth.c 2002-08-19 08:58:51 +00:00
Andrey A. Chernov dcc3da5862 Properly define SWIDTH1, add autowidth (was SWIDTH1) 2002-08-19 08:50:41 +00:00
Tim J. Robbins e92a3d83fc 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 Barcroft 2cd998a25d 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
Michael C . Wu c3121a34a0 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 Perlstein 64a3cc3d0d 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 Drehmel f8418db73e - 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 Drehmel 71a00a449f - 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 Drehmel 5618f72405 - 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 Drehmel 3248d0a517 - 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 Drehmel 620035ef89 - 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 Drehmel d542f511a0 - 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 Drehmel 840b798c83 - 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 Drehmel b7dbaf7b46 -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
Tim J. Robbins e74101e4ef Basic support for wide character I/O: getwc(), fgetwc(), getwchar(),
putwc(), fputwc(), putwchar(), ungetwc(), fwide().
2002-08-13 09:30:41 +00:00
Mike Barcroft af8c0bce98 Implement POSIX.1-2001 (XSI)'s ulimit(3).
Submitted by:	Kyle Martin <mkm@ieee.org>
2002-08-08 04:50:36 +00:00
Tim J. Robbins babfb08b53 Sort prototypes by function name. 2002-08-06 06:26:06 +00:00
Tim J. Robbins 9a1a792488 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 Barcroft b79204a1d9 Fix some style bugs.
Submitted by:	bde
2002-08-05 16:37:05 +00:00
Tim J. Robbins 6b44a04d1c 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 Barcroft 823f68a28a Implement POSIX.1-2001 (XSI)'s fmtmsg(3). 2002-08-05 06:49:58 +00:00
Tim J. Robbins 4bd5585fbd Change wctype_t to an unsigned type to avoid warnings. 2002-08-04 12:43:53 +00:00
Tim J. Robbins 4645079944 Add the ISO C90 Amd. 1 wctrans(3) and towctrans(3) functions. 2002-08-04 12:09:08 +00:00
Tim J. Robbins e9fb70115f Add ISO C90 Amd. 1 btowc(3) and wctob(3) functions. 2002-08-03 13:49:55 +00:00
Tim J. Robbins 5b32667c57 Add ISO C90 Amd. 1 wctype(3) and iswctype(3) functions. 2002-08-03 04:18:40 +00:00
Robert Watson b5620ce3a6 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 Barcroft 29284d7138 Implement the POSIX.1-2001 (XSI) header, <cpio.h>. 2002-08-01 07:18:38 +00:00
Robert Drehmel d6d1eb5d18 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
Mike Heffner 4a59c3ab55 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
Kirk McKusick fb36a3d847 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
Garrett Wollman 603a6e79d8 Support POSIX/SUS ``programming environment'' mistake in confstr(). 2002-07-15 22:21:33 +00:00
Garrett Wollman 476d84ff75 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
Garrett Wollman ef5b639902 getopt(3) was also added in 1003.2-1992. 2002-07-15 21:32:45 +00:00
Garrett Wollman 2d7aab98c6 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
Garrett Wollman 702b2a722b 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 Perlstein 886ee6f6a5 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
Maxim Sobolev 6f8d27fc3e Correct _PATH_RCP to be /bin/rcp, not /usr/bin/rcp. 2002-07-14 13:04:15 +00:00
Alfred Perlstein 4e37855e01 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
David E. O'Brien 6087d2441e Don't define wchar_t if we are a C++ compiler.
PR:		31864, 40084
2002-07-09 05:13:30 +00:00
Mike Barcroft ba5fe51088 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
Mark Murray 108b116d47 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
Mark Murray 03abafac4c 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
Garrett Wollman b3ab54e105 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
Garrett Wollman b8c5405411 Resort namespace blocks into a more sensible order. Delete a redundant
comment.
2002-06-27 18:40:51 +00:00
Warner Losh baefb2ee4e Minor libc internal-only interface change for mapv4v6. 2002-06-26 08:18:42 +00:00
Kirk McKusick 1c85e6a35d 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
David E. O'Brien 08d68d18e0 Guard definitions for use with C++ code.
Submitted by:	Ed Hall <edhall@yahoo-inc.com>
2002-06-19 06:04:37 +00:00
Garrett Wollman 8466ae9033 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
Garrett Wollman 73cf72f565 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
Matthew N. Dodd 2b13992856 Restore local bits lost in recent merge from NetBSD. 2002-06-16 08:29:35 +00:00
Garrett Wollman 1cb2a9ae56 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 Barcroft feb34d4874 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
Poul-Henning Kamp ff84d98ac2 Const poison.
Partially submitted by:	wollman
2002-05-30 21:59:16 +00:00
Garrett Wollman fda2301943 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
Garrett Wollman dc12134a80 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 Perlstein 6ba807ae3a Assume __STDC__, remove non-__STDC__ code.
Add $FreeBSD$.

Submitted by: keramida
2002-05-28 16:56:14 +00:00
Mike Barcroft b0694f6170 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
Daniel Eischen 04249148fb Reorder prototypes to be in alphabetical order. 2002-05-24 04:35:55 +00:00
Daniel Eischen 9de68a9f4c Add the prototypes for pthread_suspend_all_np and pthread_resume_all_np. 2002-05-24 04:33:07 +00:00
Juli Mallett 5fab96cfa4 Move _PATH_WALL from dump and shutdown's local pathnames.h to paths.h. 2002-05-17 11:47:12 +00:00
Ruslan Ermilov 5d86203733 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
Poul-Henning Kamp 950e983e03 Use explicitly sized fields for the tape format definition.
Sponsored by:	DARPA & NAI Labs.
2002-05-14 06:59:55 +00:00
Ruslan Ermilov c7b111cba8 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
Dag-Erling Smørgrav 75f3111c6f Add some more commonly-used directories and files.
Sponsored by:	DARPA, NAI Labs
2002-05-08 00:37:50 +00:00
Dag-Erling Smørgrav f249dbcc71 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
Poul-Henning Kamp 9908ed2b1e Constify _malloc_options. 2002-04-24 16:49:36 +00:00
Maxime Henrion d786139c76 Rework the kernel environment subsystem. We now convert the static
environment needed at boot time to a dynamic subsystem when VM is
up.  The dynamic kernel environment is protected by an sx lock.

This adds some new functions to manipulate the kernel environment :
freeenv(), setenv(), unsetenv() and testenv().  freeenv() has to be
called after every getenv() when you have finished using the string.
testenv() only tests if an environment variable is present, and
doesn't require a freeenv() call. setenv() and unsetenv() are self
explanatory.

The kenv(2) syscall exports these new functionalities to userland,
mainly for kenv(1).

Reviewed by:	peter
2002-04-17 13:06:36 +00:00
Mike Barcroft a681180ac7 Include <sys/_types.h>. This should have been part of the previous
revision.
2002-04-15 03:33:27 +00:00
Mike Barcroft 6e07075911 Add support for X/Open.
PR: 37078
2002-04-15 03:21:21 +00:00
Dag-Erling Smørgrav e479b601dd (ab)use unused bits in the pw_fields member of struct passwd to record
the source of the data contained in the structure.

Sponsored by:	DARPA, NAI Labs
2002-04-14 22:24:55 +00:00
Mike Barcroft 0b7879101e Be more strict about exposing BSD-specific functions when a standard
has been requested.

Unconditionalize the definition of INET_ADDRSTRLEN and
INET6_ADDRSTRLEN.  Doing this helps expose bogus redefinitions in 3rd
party software.
2002-04-10 10:51:53 +00:00
Mike Barcroft 61b60edfd3 o Move some function prototypes from <string.h> to the newly rewritten
<strings.h>, based on POSIX.1-2001's requirements.
o Add 'restrict' qualifier (spelled '__restrict') to functions in
  <string.h>, as per C99 and POSIX.1-2001.
o Properly expose new POSIX.1-2001 functions in <string.h>.
2002-04-04 05:41:57 +00:00
Ruslan Ermilov 82813a8c7a Don't clobber headers that we didn't create.
Noticed by:	bde
Reviewed by:	bde
2002-04-03 17:29:20 +00:00
Poul-Henning Kamp 6ba22b4849 Remove the disktab.h include file from the build. 2002-04-01 20:20:16 +00:00
Poul-Henning Kamp 4f3c3c4b5c This file is entirely bogus. 2002-04-01 20:03:31 +00:00
Mike Barcroft 8822d3fb83 o Implement <sys/_types.h>, a new header for storing types that are
MI, not required to be a fixed size, and used in multiple headers.
  This will grow in time, as more things move here from <sys/types.h>
  and <machine/ansi.h>.
o Add missing type definitions (uint16_t and uint32_t) to
  <arpa/inet.h> and <netinet/in.h>.
o Reduce pollution in <sys/types.h> by using `#if _FOO_T_DECLARED'
  widgets to avoid including <sys/stdint.h>.
o Add some missing type definitions to <unistd.h> and note the ones
  that still need to be added.
o Make use of <sys/_types.h> primitives in <grp.h> and <sys/types.h>.

Reviewed by:	bde
2002-04-01 08:12:25 +00:00
Ruslan Ermilov 9f1207d517 Install sys/security/lomac/*.h to /usr/include/security/lomac/.
Install sys/<arch>/include/pc/*.h to /usr/include/machine/pc/.

PR:		docs/29534

Install sys/netatm/*/*.h to /usr/include/netatm/*/.

Don't install compatibility symlinks for <machine/soundcard.h>
and <machine/joystick.h>.  Three years is enough to be aware of
the change, and these weren't visible in the SHARED=symlinks
case.

Back out include/Makefile,v 1.160 that was a null change anyway
due to the bug in the path, and we now don't want to install
these headers because they would otherwise be invisible in the
SHARED=symlinks case.

Don't install IPFILTER headers.  Userland utilities fetch them
directly, and they were not visible in the SHARED=symlinks case.

Resurrect SHARED=symlinks in Makefile.inc1.

PR:		bin/28002

Prodded by:	bde
MFC after:	2 weeks
2002-03-26 16:05:14 +00:00
Bruce Evans c73f9145f3 Join continuation lines that fit in 80 columns after removal of __P(()). 2002-03-26 01:37:03 +00:00
Bruce Evans 514a0ae7d2 Fixed some style bugs in the removal of __P(()). Some function parameter
lists were outdented to column 0.
2002-03-26 01:35:05 +00:00
Warner Losh f1f4666ecd Missed a __P in a .x file, remove it anyway 2002-03-24 01:11:49 +00:00
Warner Losh bb28f3c29b Breath deep and take __P out of the system include files.
# This appears to not break X11, but I'm having problems compiling the
# glide part of the server with or without this patch, so I can't tell
# for sure.
2002-03-23 17:24:55 +00:00
Alfred Perlstein bc0381304d rename 'enum res' and 'struct status' to 'enum sm_res' and 'struct sm_status'
to avoid -Wshadow warnings in consumers of its generated header files.
2002-03-22 19:43:21 +00:00
Alfred Perlstein b275d8fe48 Constify the first arg to callrpc(3). 2002-03-22 19:19:32 +00:00
Warner Losh 80578e902c const poison just like NetBSD. 2002-03-22 02:43:01 +00:00
Warner Losh ae10a3fcce Make user_from_uid and group_from_gid return const char *, just like
NetBSD.  Update man page to reflect this.
2002-03-22 02:35:47 +00:00
Ruslan Ermilov 7a43a96ab0 Replaced hacks in sbin/Makefile,v 1.99 and usr.sbin/Makefile,v 1.217
with the NO_IPFILTER make.conf(5) knob.

(So that we can "make the-rest-of-the-world" again.)
2002-03-21 09:15:39 +00:00
David E. O'Brien fb8294fed9 Tokens after #endif are not strict ISO. 2002-03-13 10:29:06 +00:00
Mike Barcroft 6a6230d2f6 o Add INET_ADDRSTRLEN and INET6_ADDRSTRLEN defines to <arpa/inet.h>
for POSIX.1-2001 conformance.
o Add magic to <netinet/in.h> and <netinet6/in6.h> to prevent
  redefining INET_ADDRSTRLEN and INET6_ADDRSTRLEN.
o Add a note about missing typedefs in <arpa/inet.h>.
2002-03-10 06:42:27 +00:00
Mike Barcroft d846855da8 o Don't require long long support in bswap64() functions.
o In i386's <machine/endian.h>, macros have some advantages over
  inlines, so change some inlines to macros.
o In i386's <machine/endian.h>, ungarbage collect word_swap_int()
  (previously __uint16_swap_uint32), it has some uses on i386's with
  PDP endianness.

Submitted by:	bde

o Move a comment up in <machine/endian.h> that was accidentially moved
  down a few revisions ago.
o Reenable userland's use of optimized inline-asm versions of
  byteorder(3) functions.
o Fix ordering of prototypes vs. redefinition of byteorder(3)
  functions, so that the non-GCC (libc asm) case has proper
  prototypes.
o Add proper prototypes for byteorder(3) functions in <sys/param.h>.
o Prevent redundant duplicate prototypes by making use of the
  _BYTEORDER_PROTOTYPED define.
o Move the bswap16(), bswap32(), bswap64() C functions into MD space
  for platforms in which asm versions don't exist.  This significantly
  reduces the complexity of some things at the cost of duplicate code.

Reviewed by:	bde
2002-03-09 21:02:16 +00:00
Brian Feldman aeff2223dc Synch with OpenBSD (style). 2002-03-08 20:52:52 +00:00
Mike Barcroft e0865ca9d8 Use a integral type that doesn't require <sys/types.h>. This
accomplishes the goal of actually making <grp.h> independent of other
headers for the definition of its types.

Pointy hat to:	mike
2002-03-08 03:09:46 +00:00
Mike Barcroft 834dcade30 Rather than include namespace pollution in <grp.h> in order to declare
`gid_t', use the canonical protection scheme to define a type in two or
more headers.  This brings <grp.h> closer to POSIX.1-2001 conformance.
2002-02-26 19:43:03 +00:00
Maxim Sobolev b73aa6457c Per POSIX <grp.h> doesn't require <sys/types.h>.
Submitted by:	ache
2002-02-25 17:20:40 +00:00
Maxim Sobolev 85148c8f03 Backout rev.1.5 - it seems that it's posixly correct that the program
needs to include <sys/types.h> before <grp.h>.

Submitted by:	fjoe, sheldonh
		David Malone <dwmalone@maths.tcd.ie>
2002-02-25 13:55:47 +00:00
Maxim Sobolev bef621eb79 In rev.1.4 type of (group)->gr_gid was changes from (int) to (gid_t),
so that <sys/types.h> is now required. Add it, otherwise it breaks
some ports.

Submitted by:	Joe Marcus Clarke <marcus@marcuscom.com>
2002-02-25 13:24:02 +00:00
Mike Barcroft fd8e4ebc8c o Move NTOHL() and associated macros into <sys/param.h>. These are
deprecated in favor of the POSIX-defined lowercase variants.
o Change all occurrences of NTOHL() and associated marcros in the
  source tree to use the lowercase function variants.
o Add missing license bits to sparc64's <machine/endian.h>.
  Approved by: jake
o Clean up <machine/endian.h> files.
o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>.
o Remove prototypes for non-existent bswapXX() functions.
o Include <machine/endian.h> in <arpa/inet.h> to define the
  POSIX-required ntohl() family of functions.
o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>,
  and <sys/param.h>.
o Prepend underscores to the ntohl() family to help deal with
  complexities associated with having MD (asm and inline) versions, and
  having to prevent exposure of these functions in other headers that
  happen to make use of endian-specific defines.
o Create weak aliases to the canonical function name to help deal with
  third-party software forgetting to include an appropriate header.
o Remove some now unneeded pollution from <sys/types.h>.
o Add missing <arpa/inet.h> includes in userland.

Tested on:	alpha, i386
Reviewed by:	bde, jake, tmm
2002-02-18 20:35:27 +00:00
Daniel Eischen 3445a5f016 Oops, forgot to commit this (s/ucontext_t/struct __ucontext/). 2002-02-17 19:21:42 +00:00
Warner Losh fc69394f0a Move user_from_uid to pwd.h
Move group_from_gid to grp.h
Remove from stdlib.h
Make the prototypes match the code
Fix rm and mv to include new files.

NetBSD has these defined in those files, and others too that I've not
done.

Approved by: terminal room kabal
Reviewed by: jhb, phk
2002-02-14 01:59:47 +00:00
Warner Losh 906a42ebca Revert 1.29. It breaks the build. Will figure out a better way to do
this that doesn't break things.
2002-02-13 10:11:38 +00:00
Warner Losh 5644da9ee5 Make the user_from_uid and group_from_gid prototypes match the actual
function definitions.
2002-02-13 09:33:00 +00:00
Dag-Erling Smørgrav ed4d1c46a2 Apply the following mechanical transformations in preparation for
ansification and constification:

    s{\s+__P\((\(.*?\))\)}{$1}g;
    s{\(\s+}{\(}g;
    s{\s+\)}{\)}g;
    s{\s+,}{,}g;
    s{(\s+)(for|if|switch|while)\(}{$1$2 \(}g;
    s{return ([^\(].*?);}{return ($1);}g;
    s{([\w\)])([!=+/\*-]?=)([\w\(+-])}{$1 $2 $3}g;
    s{\s+$}{\n};g

Also add $FreeBSD$ where needed.

MFC after:	1 week
2002-02-06 13:30:31 +00:00
Alfred Perlstein 8d6301358e Fix cc -Wall, fix rcsid warnings, add missing prototypes,
change prototypes to be the same as in the original sun tirpc code.
Remove ()P macro in a file where the mayority had ()P already removed.
Add them if the mayority use ()P macros.

Submitted by: mbr
Requested by: bde
2002-02-05 23:43:43 +00:00
Dag-Erling Smørgrav 576da32600 Move arguments in prototype out of application namespace.
Sponsored by:	DARPA, NAI Labs
2002-02-05 06:31:58 +00:00
Rob Braun 509853bbfd Makes __istype() an inline (and a non inlined) function to avoid C++
compile issues.  std::isspace(' ') was expanding to std::(!!_maskrune...)
which would cause a C++ compile error.  Making __istype() an inline
causes the expansion to be std::__istype() instead, which is valid.

Reviewed by: jkh
2002-02-05 06:21:34 +00:00
Maxim Sobolev c6de4ce791 Allow ldd(1) be used on shared libraries in addition to executables. 2002-02-04 10:33:48 +00:00
Mark Murray 0e5065e34c WARNS-n and lint(1) silencer. Declare (const) strings properly as
'const char *'.
2002-02-03 12:00:05 +00:00
David Malone 98d1592458 Change brk's prototype from char *brk(const char *) to int brk(const void *)
and sbrk's prototype from char *sbrk(int) to void *sbrk(intptr_t).

This makes us more consistant with NetBSD and standards which include
these functions. Bruce pointed out that ptrdiff_t would probably
have been better than intptr_t, but this doesn't match other
implimentations.

Also remove local declarations of sbrk and unnecessary casting.

PR:		32296
Tested by:	Harti Brandt <brandt@fokus.gmd.de>
MFC after:	1 month
2002-01-24 12:11:31 +00:00
Mark Murray 5567b258eb Use the proper type (gid_t) for (group)->gr_gid to be orthogonal
with uid_t usage and (user)->pw_uid.

PR:		3242
2002-01-22 17:32:53 +00:00
Matthew Dillon 170ac683f2 I've been meaning to do this for a while. Add an underscore to the
time_to_xxx() and xxx_to_time() functions.  e.g. _time_to_xxx()
instead of time_to_xxx(), to make it more obvious that these are
stopgap functions & placemarkers and not meant to create a defacto
standard.  They will eventually be replaced when a real standard
comes out of committee.
2002-01-19 23:20:02 +00:00
Mike Barcroft 6304c952e5 Add support for C++.
Submitted by:	bde
PR:		33590
2002-01-06 19:04:12 +00:00
Doug Ambrisko 0d6fcb5c0e Fix bugs in the structure for rx_frame by making gap length one byte and
a packed array so sizeof work.  This broke RFMON mode and passing
up 802.11 packets.

The Linux emulation code was derived from the open source Linux driver to
maintain compatibility.

LEAP support is added, hints from Richard Johnson.  I've verified this
locally with PC350v42510.img firmware.  More bug fixing from Marco to
fix long passwords.

Change DELAYs in flash part of driver to FLASH_DELAY which uses tsleep
so it doesn't look like your system died during a flash update.

Install header files in /usr/include/dev/an

Cleanup some ifmedia bugs add "Home" key mode to ifmedia and ancontrol.
This way you can manage 2 keys a little easier.  Map the home mode into
key 5.  Enhance ifconfig to dump the various configured SSIDs.  I use
a bunch of different ones and roam between them.  Use the syntax similar
to the WEP keys to deal with setting difference SSIDs.

Bump up up the Card capabilities RID since they added 2 bytes to it
in the latest firmware.  Thankfully we changed it from a terminal
failure so the card still worked but the driver whined.

Some cleanup patches from Marco Molteni.

Submitted by:	Richard Johnson <raj@cisco.com>
		Marco Molteni <molter@tin.it>
		and myself
Various checks: David Wolfskill <david@catwhisker.org>
Reviewed by:	Brooks Davis <brooks@freebsd.org>
		Warner Losh <imp@freebsd.org>
Approved by:	Brooks Davis <brooks@freebsd.org>
		Warner Losh <imp@freebsd.org>
Obtained from:	Linux emulation API's from Aironet driver.
2001-12-31 22:01:44 +00:00
Mike Barcroft ec55a6050d Fix support for K&R C.
MFC after:	3 days
2001-12-22 05:18:37 +00:00
Ruslan Ermilov a7aaf57e4a FILES support for bsd.prog.mk. See bsd.README for details.
Stolen from:	NetBSD
2001-12-17 13:59:35 +00:00
Brian Feldman 125c50cdeb Install devfs includes. 2001-12-17 13:38:58 +00:00
Sheldon Hearn 85519b003a Add bmake glue for src/contrib/smbfs and connect userland smbfs
support to the build.

The MFC reminder below is subject to <re@FreeBSD.org> approval
prior to 4.5-RELEASE.

Reviewed by:	bp, fjoe
MFC:	1 week
2001-12-14 11:41:22 +00:00
Alexey Zelkin 19e4b807f6 * style(9)'ify
* add K&R support to langinfo.h

Requested by:	bde (2)
2001-12-12 15:41:08 +00:00
Alexey Zelkin 20ad349dbb Get rid of unsed since rev 1.109 of lib/Makefile WANT_CSRG_LIBM define.
We'll never install math.h wrapped by this define since msun's math.h
is using, so it should be removed from the source tree at some point
(after merge of useful stuff to msun's math.h which is installing now
to /usr/include)

Reviewed by:    bde
2001-12-11 16:38:33 +00:00
Alexey Zelkin 52d6b43026 Add my e-mail to copyrights 2001-12-11 16:00:47 +00:00
David E. O'Brien 3d7f57bc69 An extra #ifdef crept in with rev 1.38. 2001-12-05 04:16:33 +00:00
David E. O'Brien 1bd6873376 Turn back on fmtcheck's attribute checks, guarded for non-GCC compilers.
Submitted by:	bde
2001-12-04 21:30:23 +00:00
David E. O'Brien 38f54953b3 Remove the GCC'ism "__attribute__" from the 'fmtcheck' prototype.
I leave it up to someone else to fix this breakage properly.
2001-12-04 01:24:10 +00:00
Mark Murray 7a32b4b1c6 Merge from master (crypto) telnet. WARNS fixes for alpha. 2001-12-03 12:41:19 +00:00
Mike Barcroft 4f25b0aa46 Add a missing underscore.
Submitted by:	fenner
2001-12-01 03:48:15 +00:00
Mike Barcroft de2656d0ed o Stop abusing MD headers with non-MD types.
o Hide nonstandard functions and types in <netinet/in.h> when
  _POSIX_SOURCE is defined.
o Add some missing types (required by POSIX.1-200x) to <netinet/in.h>.
o Restore vendor ID from Rev 1.1 in <netinet/in.h> and make use of new
  __FBSDID() macro.
o Fix some miscellaneous issues in <arpa/inet.h>.
o Correct final argument for the inet_ntop() function (POSIX.1-200x).
o Get rid of the namespace pollution from <sys/types.h> in
  <arpa/inet.h>.

Reviewed by:		fenner
Partially submitted by:	bde
2001-12-01 03:43:01 +00:00
Robert Watson 433a202297 o Improve consistency of style by fixing tabs around _PATH_AUTHCONF. 2001-11-30 16:25:09 +00:00
Robert Watson 0caeee4e36 o Introduce _PATH_CAPABILITY and _PATH_CAPABILITY_DB to the system
path set.  These files will hold per-user capability information.

Obtained from:	TrustedBSD Project
Submitted by:	tmm
2001-11-30 16:24:20 +00:00
Bruce Evans 930dbabb42 Oops, actually fix the namespace pollution for atoll() as the previous
commit claimed to do.
2001-11-29 07:08:56 +00:00
Bruce Evans 614b366763 Fixed namespace pollution and/or breakage of K&R and C90 support related to
the following functions in the following commits:
- atoll() in revs 1.23-1.25
- llabs() and lldiv() in revs 1.22
- strtoq() and strtouq() in revs 1.18
C99 functions must not be declared in C90/POSIX.1-1990 sections, and
"long long" must not be exposed to compilers that don't support it.

Fixed style bugs (mainly misindentation and disorder) related the
following functions in the following commits:
- atoll() in revs 1.23-1.25
- getprogname() in rev.1.21
- sranddev() in revs 1.19-1.20
- strtoq() and strtouq() in rev.1.13
- user_from_uid() in rev.1.1
Breakage of K&R and C90 support used to be avoided by conditializing the
"long long"s for strtoq() and strtouq() on __STRICT_ANSI__, but the
conditionals should have gone away in rev.1.13 when the "long long"s went
away (the problem was moved to the places that declare quad_t and u_quad_t).
2001-11-28 19:52:25 +00:00
Bruce Evans d23c1cd5d7 Fixed namespace pollution in previous commit. The C99 function
sterror_r() must not be declared in the C90/POSIX.1-1990 section.
Put it in the nonstandard section for now.
2001-11-28 19:02:01 +00:00
Andrey A. Chernov 46a9bbdc62 Whitespace formatting 2001-11-28 02:18:53 +00:00
Andrey A. Chernov 6497eddc3f Fix just added atoll prototype 2001-11-28 01:51:00 +00:00
Andrey A. Chernov 59d01330c4 Add atoll(3) to conform POSIX and C99 2001-11-28 01:22:08 +00:00
Wes Peters 9c324dc0c0 Add strerror_r function per Posix prototype.
Reviewed by:	Mike Barcroft <mike@FreeBSD.org>
MFC after:	2 weeks
2001-11-27 07:39:46 +00:00
Brian Feldman 13d98e8c66 Introduce readpassphrase(3), a superset of getpass(3). This
comes originally from Todd Miller.

Obtained from:	OpenBSD
2001-11-20 15:15:42 +00:00
Brian Feldman bd0489873c Install LOMAC includes from the new directory. 2001-11-20 14:37:07 +00:00
John Baldwin 3878fff7db Use fixed-size fields in the structure for the timed protocol. This
includes changing a struct timeval to an explicit structure of two
int32_t's.  This requires using temporary timevals in several places
when calling gettimeofday(), settimeofday(), etc.  With this timed now
works properly on 64-bit platforms such as Alpha.

Obtained from:	NetBSD
2001-11-20 06:36:09 +00:00
Brian Feldman 3d383bb3f6 Install LOMAC public headers.
Sponsored by:	DARPA, NAI Labs (CBOSS project)
2001-11-19 05:10:50 +00:00
Mike Barcroft 7a4a63270f o Implement imaxabs(), imaxdiv(), llabs(), lldiv().
o Update abs(3), div(3), labs(3), ldiv(3) to reflect standards
  conformance and add additional references.

Reviewed by:	bde, wollman
2001-11-15 02:05:03 +00:00
Alfred Perlstein 0a679263f9 NFS split forgot to prototype nfsclnt() syscall, do it. 2001-11-13 09:07:31 +00:00
Ruslan Ermilov e117e7a5b0 - Put missing prototype for rcmd() in <unistd.h>.
- Clean up the manpage.
- style(9) rcmdsh.c.

Committed from:	BSDCon/EU 2k+1 terminal room
2001-11-09 15:19:25 +00:00
David E. O'Brien c222b1694b Traditionally work in the -traditional case.
Submitted by:	joerg
2001-11-07 23:14:31 +00:00
Peter Wemm c2900483ae Remove FreeBSD/vax and FreeBSD/tahoe support.
Add $FreeBSD$

Submitted by:	phk
2001-11-03 08:38:54 +00:00
Mike Barcroft 0ac2d551f2 o Add new header <sys/stdint.h>.
o Make <stdint.h> a symbolic link to <sys/stdint.h>.
o Move most of <sys/inttypes.h> into <sys/stdint.h>, as per C99.
o Remove <sys/inttypes.h>.
o Adjust includes in sys/types.h and boot/efi/include/ia64/efibind.h
  to reflect new location of integer types in <sys/stdint.h>.
o Remove previously symbolicly linked <inttypes.h>, instead create a
  new file.
o Add MD headers <machine/_inttypes.h> from NetBSD.
o Include <sys/stdint.h> in <inttypes.h>, as required by C99; and
  include <machine/_inttypes.h> in <inttypes.h>, to fill in the
  remaining requirements for <inttypes.h>.
o Add additional integer types in <machine/ansi.h> and
  <machine/limits.h> which are included via <sys/stdint.h>.

Partially obtain from:	NetBSD
Tested on:		alpha, i386
Discussed on:		freebsd-standards@bostonradio.org
Reviewed by:		bde, fenner, obrien, wollman
2001-11-02 18:05:43 +00:00
Matthew Dillon e8627df69d Add time_to_int(), int_to_time(), time_to_long(), long_to_time(). 2001-10-28 20:13:16 +00:00
Matthew Dillon 5b3817c60b Make the protocol/dumprestore.h header match restore's idea of the dump
header for the case where sizeof(time_t) != sizeof(int).  dumprestore.h
was embedding time_t when it should have been embedding int32_t.

Use time_to_time32() and time32_to_time() to convert between the
protocoll/file-format time and time_t.
2001-10-28 20:01:38 +00:00
Matthew Dillon 237c4e3a9e Add routines to convert time_t to/from fixed-bit fields. These routines
serve two purposes: (1) so we can maintain backwards compatibility with
protocols (rwhod, dump, etc...) that either assume time_t is 32 bits or
assume sizeof(time_t) == sizeof(int), or make other similar assumptions.
(2) To tag such routines (by the presence of these calls) for future
cleanup/extension work.

The 32->64 routine, time32_to_time() (when time_t is 64 bits, that is),
is defined specifically to implement temporal locality to properly set the
msb bits of a 64 bit time_t quantity, using the 50 year rule.  The locality
code has not been implemented yet (and doesn't need to be for a while),
but that is the intent.   This will allow us to maintain backwards protocol
compatibility past 2038.

These routines are intended to be platform and time_t agnostic.

MFC after:	1 week
2001-10-28 19:54:49 +00:00
Peter Wemm 8fcfcd18dd ll_time and ut_time are int32_t on disk and have to remain that way
unless we dont want to run 4.x binaries any more.
2001-10-27 20:40:54 +00:00
Mike Barcroft c44a27673c Restore K&R prototype. Fix other style bugs.
Reviewed by:	asmodai, bde
2001-10-27 19:37:20 +00:00
Mark Murray 6fdd5473af Diff-reduce these two.
Really, one of them needs to disappear. I'll figure out which
later.

Reported by:	bde
2001-10-27 12:49:19 +00:00