Commit Graph

508 Commits

Author SHA1 Message Date
jruoho b55748a5cc It is not just funopen(3) that is a BSDism. 2011-09-11 07:37:06 +00:00
jruoho 74204a5f00 .Xr for fsetpos(3), not .Fn. 2011-09-11 04:55:48 +00:00
christos 01fb81a616 fix the rest of libc mi gcc-4.5 hacks. portmasters should fix the md ones. 2011-08-17 09:53:53 +00:00
joerg 9c6b248add Set error indicator on invalid arguments. From Carsten Hey. 2011-07-22 23:12:30 +00:00
jruoho 4c0e40e4b4 Use a list for clarity, update standards, etc. 2011-07-18 05:17:16 +00:00
joerg 3eb244d801 Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
2011-07-17 20:54:30 +00:00
wiz 846092f009 Various minor improvements. 2011-06-27 08:21:07 +00:00
christos e2bebf7172 * Arrange for interfaces that create new file descriptors to be able to
set close-on-exec on creation (http://udrepper.livejournal.com/20407.html).

    - Add F_DUPFD_CLOEXEC to fcntl(2).
    - Add MSG_CMSG_CLOEXEC to recvmsg(2) for unix file descriptor passing.
    - Add dup3(2) syscall with a flags argument for O_CLOEXEC, O_NONBLOCK.
    - Add pipe2(2) syscall with a flags argument for O_CLOEXEC, O_NONBLOCK.
    - Add flags SOCK_CLOEXEC, SOCK_NONBLOCK to the socket type parameter
      for socket(2) and socketpair(2).
    - Add new paccept(2) syscall that takes an additional sigset_t to alter
      the sigmask temporarily and a flags argument to set SOCK_CLOEXEC,
      SOCK_NONBLOCK.
    - Add new mode character 'e' to fopen(3) and popen(3) to open pipes
      and file descriptors for close on exec.
    - Add new kqueue1(2) syscall with a new flags argument to open the
      kqueue file descriptor with O_CLOEXEC, O_NONBLOCK.

* Fix the system calls that take socklen_t arguments to actually do so.

* Don't include userland header files (signal.h) from system header files
  (rump_syscallargs.h).

* Bump libc version for the new syscalls.
2011-06-26 16:42:39 +00:00
enami 9aed075519 - Put empty line after the local variable definition in the sample code
to improve readability.
- Remove indirection operator to clarify error condition.
2011-04-20 23:37:51 +00:00
dholland 8ba9dddb47 Eliminate dead store. From Henning Petersen in PR 42776. Doesn't change
the output .o file.
2011-03-24 02:29:33 +00:00
jnemeth fd52cff654 vsnprintf_ss does NOT handle floating point formats 2010-12-26 12:39:54 +00:00
wiz 207ab8d006 Add punctuation. 2010-12-22 17:06:03 +00:00
christos 92a95e7ba4 document vsnprintf_ss 2010-12-22 16:59:10 +00:00
wiz 3d3c5d42cb Observe the following spelling:
- wide character (noun)
- wide-character (adjective)

Inspired by jmc@OpenBSD.
2010-12-16 17:42:25 +00:00
joerg 3b7d8067b3 Don't redeclare __isthreaded. 2010-12-08 02:07:03 +00:00
christos b0f3f04a67 PR/44113: Nicolas Joly: printf(3) should ignore zero padding for nan/inf 2010-11-19 00:44:18 +00:00
tron 410614d6b3 Replace _FPOS_OVERFLOW() macro with a static inline function called
__fpos_overflow() that doesn't cause any lint warnings.
2010-10-24 17:44:32 +00:00
christos 3dbfe3dd7e tell lint to shut up. 2010-10-23 14:12:50 +00:00
christos 13fa4dc134 not that it can happen, but make the test more robust. 2010-10-22 22:00:32 +00:00
christos ec053f73a0 implement EOVERFLOW 2010-10-22 21:29:45 +00:00
christos 603e33ef32 Fix return value documentation. Add EOVERFLOW for ftell, but not for fseek. 2010-10-22 21:29:31 +00:00
enami 3cef3e6eba The was is not an argument but simply a part of sentense. 2010-10-07 00:14:14 +00:00
enami abfd061908 Add missing period at the end of sentense. 2010-09-28 00:39:56 +00:00
tnozaki 9ef74dfbcf validate flags/oflags from __sflag() befere call __sfp().
reviewed by enami-san, thanks.
2010-09-27 17:08:29 +00:00
tnozaki 6d102a3218 fix off-by-one, pointed out by enami-san, thanks! 2010-09-27 16:50:13 +00:00
tron ac440cccfd Change last commit to Use "ptrdiff_t" instead of "intptr_t" because the
former is more appropriate in this case.
2010-09-25 14:00:30 +00:00
tron abf0c843b2 Add explicit cast to fix lint error on 32bit platforms. 2010-09-25 13:45:11 +00:00
wiz 14087bca56 Remove trailing whitespace, merge error sections for same error, nits. 2010-09-25 09:44:08 +00:00
uwe 46b35128cb Make groff happy. 2010-09-25 01:19:39 +00:00
christos 97fddff649 add man page as promised. 2010-09-24 21:50:56 +00:00
tnozaki 93b7363c93 add fmemopen(3) derrived from POSIX:2008.
libc minor bump.
2010-09-24 09:21:53 +00:00
drochner 927f8fc1e3 apply an 11 years old fix from FreeBSD:
if EBADF is returned due to a read from a write-only stream, also
set ferror()
found by a selftest of Python-2.6.6, thanks to obache for pointing
out the details
2010-09-10 10:29:23 +00:00
wiz c70635ec83 I assume "POSIX 200805" is IEEE Std 1003.1-2008 (POSIX.1), so use
appropriate .St.
2010-09-06 19:47:37 +00:00
christos 4ddc2fb37c add dprintf and vdprintf 2010-09-06 14:52:55 +00:00
tnozaki 9731566dda initialize fake FILE, not fp. 2010-07-31 08:47:34 +00:00
christos e408681794 undo unrelated diff. 2010-07-31 07:58:22 +00:00
tnozaki 8c1984cdde fix coredump vfwprintf(stderr) reported in current-user@
rework rev1.9, _FILEEXT_SETUP() doesn't care wcio_data. so initialize it.
2010-07-31 07:24:52 +00:00
jruoho c8bb322856 Use .Fn instead of .Fa for functions. Also rearrange slightly. 2010-06-30 13:38:10 +00:00
joerg 8331b95fa9 Fix trailing whitespace 2010-05-14 03:22:49 +00:00
joerg f0c7b477dc Fix markup 2010-05-14 03:04:32 +00:00
joerg 332c9caca2 Use plain references and don't depend on multiple expansion runs. 2010-05-13 21:52:43 +00:00
joerg fb270d1e3d Mask %U, it is a macro nowadays. 2010-05-13 21:50:11 +00:00
jruoho f05bdd5ecd Remove the note about the standard recommending fgets(3);
should be clear enough from the big warning to "NEVER use gets()".
2010-05-13 18:38:24 +00:00
wiz 968a574a9b Wording. 2010-05-08 11:35:14 +00:00
jruoho 2184425c2a Note that EBADF is optional for fileno() in POSIX. 2010-05-06 09:18:06 +00:00
jruoho dccc94a2b3 Put the historical note to its own section. Note that also the other
functions (except the _unlocked variants) were in early UNIX versions.
2010-05-06 09:01:34 +00:00
jruoho aa18298cd3 Note POSIX compliance. 2010-05-06 08:58:57 +00:00
jruoho 4c0553eda5 Correct the discussion about return values: fileno() may fail and return -1.
Note that in such cases the NetBSD implementation does not set errno to
EBADF, hence diverging from the standard in this small detail.
2010-05-06 08:14:08 +00:00
jruoho 29cfcc518e Upon lukem@'s request, put the list of functions back.
XXX: Someone needs to go through all standard I/O functions in the libc,
     update the list, and keep it updated. While at it, please convert the
     list to use .Xr so that we can have links in HTML pages.
2010-05-05 04:13:16 +00:00
jruoho dd121e1e5b Remove the list of functions.
This list was updated only two times in nearly two decades.

(If people need to learn the standard I/O functions in C, it would be better
to mention K&R or some other textbook; if people need to know the list of
functions, it would be better to point out the location of the standard.)

In addition, some clean-up and structural editing.
2010-05-04 07:43:12 +00:00