Commit Graph

1967 Commits

Author SHA1 Message Date
christos
98c744016d rename the macros ftsent_ since they apply to the ftsent struct not the
fts one.
2012-03-14 00:25:19 +00:00
christos
c5e820cae4 PR/45989: Martin Husemann: lint invocation does include -w only on i386
- turn lint -w for all the platforms after fixing the lint warnings.
- add _DIAGASSERTS() for casts that would assign values to types that
  would not fit.
- change types, add casts
- change into ansii prototypes
- turn on _DIAGNOSTIC for libc (during current, to be eliminated for release
  builds)

approved by core@
2012-03-13 21:13:30 +00:00
christos
fd10e83118 misc cleanups:
- const for mibs
- #define for magic constants
- casts
2012-03-05 19:40:08 +00:00
tls
b39292dc65 Fix bug in previous: don't reinitialize on every call! Fix arc4random_buf so it actually ever initializes -- a security problem with revisions 1.9 and 1.10. 2012-03-04 00:36:43 +00:00
tls
6e07f2d4dc Make arc4random far less greedy for entropy. Make arc4random actually
implement arc4 when used by threaded programs.
2012-02-27 04:25:12 +00:00
martin
136a5cd515 Use C++ compatible declaration for posix_spawn (instead of the C99 specific
posix one).
2012-02-22 17:51:01 +00:00
njoly
e6f95d3fd6 Fix sched_set{param,scheduler} sections. 2012-02-13 16:35:59 +00:00
wiz
a49dba341d Remove duplicate function declaration. From Henning Petersen in PR 45998. 2012-02-12 13:52:51 +00:00
martin
19f52532ad Add userland part of posix_spawn. Libc functions imported from FreeBSD.
Based on Charles Zhang's summer of code project.
2012-02-11 23:31:22 +00:00
manu
ac705b5bee Do not tell about specific errno, as all xattr copying function
retuenrs error from extattr_list_file and extattr_get_file.
2011-12-16 15:21:13 +00:00
wiz
a107b19ebf Split extattr(3) into two man pages to get rid of ugly duplicate Nd.
Work done by Abhinav Upadhyay with minimal cleanup.
2011-12-16 12:46:00 +00:00
christos
082a7c0017 initialize t to protect against empty string (Kamil Dudka) 2011-11-18 20:28:17 +00:00
christos
1a8ee0ce13 handle \x sequences like c does 2011-11-06 03:42:33 +00:00
christos
c3f7d80d68 there no errors defined for time. 2011-11-05 18:17:29 +00:00
wiz
ab093fdf58 Fix typo. 2011-11-02 20:25:20 +00:00
yamt
c5341ce2da fix a function prototype. 2011-11-02 13:05:43 +00:00
christos
82be2a4e22 PR/45517: Henning Petersen: Add restrict keywords in the definition of glob
to match the declaration.
2011-10-30 21:53:43 +00:00
wiz
e02343d9a0 Fix function prototype. From Henning Petersen in PR 45516. 2011-10-25 09:28:17 +00:00
mrg
4d071395fc default O_CLOEXEC to 0 for systems that don't define it, like, say, netbsd-5. 2011-10-16 05:05:38 +00:00
christos
9292cfb210 close on exec fixes:
- open + fcntl -> open O_CLOEXEC
- configuration database file descriptors that can stay open are now opened
  fopen(db, "re")
2011-10-15 23:00:01 +00:00
rmind
50902a3b80 Mention POSIX conformance of some functions, when they appeared, sprinkle .Xr. 2011-10-15 21:35:49 +00:00
christos
b7406a928a report STT_COMMON symbols as data. 2011-10-15 21:06:58 +00:00
christos
adc9c9a3d6 Provide symbol definitions for environ and __progname. These are duplicate
definitions to the ones provided by csu, but harmless since the linker resolves
them. There are 3 non weak data symbols provided in crt0.o:

    D __progname [initialized data, assigned to ""]
    B __ps_strings [BSS since assigned to 0]
    C environ [common, uninitialized]

__ps_strings had already a second definition in libc (in BSS), now we added
__progname and __ps_strings (in BSS).

To get rid of the duplicate definition, we can remove them from csu, and
move the assignments to libc.

This is done so that libc has no undefined symbols so that linker maps
that want to do:
    ...
	local:
		*;
    ...
don't end up producing link failures for libc.
2011-10-06 20:31:41 +00:00
jruoho
c28242299e Xref kcpuset(9). 2011-10-06 05:24:41 +00:00
joerg
0a2b758384 Mark _resumecontext as dead. ANSIfy all declarations for it. 2011-09-19 21:24:57 +00:00
christos
369862dcef Never invoke utmp_update() recursively if we are root. Instead close the
read-only file so it can be opened later. It can happen when a setuid
program utmp_update, seteuid(ruid) -> getutxent() -> seteuid(0) -> pututxent()
2011-09-17 01:52:29 +00:00
matt
5724a9e8cf Refactor to fix some signedness problems. 2011-08-31 22:36:36 +00:00
joerg
d24dcc0dc7 Uses non-literal format strings 2011-08-25 18:20:22 +00:00
jmcneill
f7257e7810 maxmimum -> maximum 2011-08-23 17:28:34 +00:00
wiz
5cbea9c38a Fix variable name in SYNOPSIS to match DESCRIPTION.
From Abhinav Upadhyay <er.abhinav.upadhyay@gmail.com>.
2011-08-20 21:35:32 +00:00
jruoho
ea330d8d1a Xref limits(3). 2011-08-09 18:11:37 +00:00
wiz
942842ef79 Drop trailing whitespace. 2011-08-06 11:10:01 +00:00
jruoho
2cd297546b Xref the non-standard finite(3). 2011-08-06 11:02:41 +00:00
manu
32c00d6291 Make cp -p and mv preverve extended attributes, and complain if they cannot.
Also introduce library functions for copying extended attributes from one
file to another:
- extattr_copy_file, extattr_copy_fd, extattr_copy_link, with FreeBSD style,
  where a namespace is to be supplied
- cpxattr, fcpxattr, lcpxattr, with Linux style, where all namespaces
  accessible to the caller are copied, and the others are silently ignored.
2011-08-03 04:11:15 +00:00
njoly
f3d20aa109 Adjust xref varargs(3) -> stdarg(3) 2011-07-25 19:42:50 +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
matt
cee1c10ee1 Add ieee754 versions of the compiler runtime functions
__fixuns{sf,df,tf}{si,di}.
Add an ieee754 version of the compiler runtime function __floatuntfdi
2011-07-09 02:30:27 +00:00
joerg
93fc0a3ef4 Drop special cases for i386 and m68k. It is not a validate assumption
that the address of an argument is at the same stack slot the caller
placed in it. It is perfectely valid to copy it into the local frame
first.
2011-06-30 19:46:07 +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
sjg
82f4eed556 _gr_copy() can get called with fromgrp->gr_mem == NULL. 2011-06-09 05:11:17 +00:00
dholland
d392ff6e7a Clarify paragraph about calling setprogname, requested by Tobias Ulmer on
freenode. Bump date.
2011-05-21 19:06:44 +00:00
joerg
c98c805c05 Trailing white space 2011-05-17 07:10:39 +00:00
enami
bde048cc49 Use Pq or Po macro for better output rather than putting raw open paren
at the end of line.
2011-05-17 03:35:38 +00:00
christos
ec3000cfb2 PR/44959: Henning Petersen: glob forgets to closedir on out of space condition. 2011-05-14 22:44:06 +00:00
jruoho
fa096afe20 Xref raise_default_signal(3). 2011-05-09 09:06:21 +00:00
jruoho
db3b8477d4 Clarify STANDARDS (i.e. cf. ualarm(3) is no longer in POSIX). 2011-05-02 17:34:05 +00:00
christos
89d0622f3e Start eliminating "super-user" from the documentation. 2011-05-01 02:54:22 +00:00
christos
0a101028d4 nice should always return EPERM, not EACCES 2011-05-01 02:49:54 +00:00
wiz
3ecc6ccf87 Mark up NULL. 2011-04-29 09:43:28 +00:00