Commit Graph

735 Commits

Author SHA1 Message Date
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