Commit Graph

9364 Commits

Author SHA1 Message Date
joerg 5dd13d5b75 Weak alias directly to the catchall stub and don't strong alias twice. 2013-04-12 18:14:22 +00:00
joerg 62898dbb43 Mark __libc_thr_exit_stub as dead. 2013-04-12 18:12:58 +00:00
wiz 35fe9915cb Remove trailing whitespace. 2013-04-07 23:12:36 +00:00
christos d17f9381dd Add a small example. 2013-04-07 22:54:26 +00:00
christos 644dcf797e split init and errno to a separate file. No point in growing rtld 10K. 2013-04-05 20:15:42 +00:00
dholland b4acc95ea0 stdlib.h, not malloc.h 2013-04-05 03:17:38 +00:00
wiz 3730b7cf2f pull over agc's typo fix from agc-symver branch. 2013-04-04 21:52:04 +00:00
christos 38019b46e5 no need for __lwp_park50.S here and we don't provide __lwp_park60.S so that
it does not get accidentally used.
2013-03-29 02:10:53 +00:00
christos dabcbd76a6 Compat glue for lwp park, but does not use the new syscall yet. 2013-03-29 02:09:58 +00:00
christos 71d484f921 - Allow libpthread to be dlopened again, by providing libc stubs to libpthread.
- Fail if the dlopened libpthread does pthread_create(). From manu@
- Discussed at length in the mailing lists; approved by core@
- This was chosen as the least intrusive patch that will provide
  the necessary functionality.
XXX: pullup to 6
2013-03-21 16:49:11 +00:00
lukem 10126a0b3e Use "unsigned FOO" instead of less-portable "u_FOO". 2013-03-20 23:44:47 +00:00
christos c60a6af952 now live in common/lib/libc/arch/sparc64/string 2013-03-17 00:43:45 +00:00
christos e2fcd4fa37 apply 2013b 2013-03-16 00:59:14 +00:00
martin cd29bf72fc Remove clearing of ucontext_t, the only random register values now are
argument and scratch registers (which will be reloaded after return anyway).
2013-03-13 08:05:46 +00:00
martin c06bee84e7 Save the GP register value and restore it on longjmp.
While formally GP is not a callee-saved register, for static linking
the link time optimization described in section 3.2.3 of the "Calling
Standard for Alpha Systems" allows the caller to rely on GP being the
value needed within setjmp() - and not restore it after return if setjmp
and the call site share a GP value.

This fixes longjmp/setjmp for statically linked programs, e.g. /rescue/csh
or the static tcsh variant from pkgsrc.
2013-03-12 19:38:20 +00:00
tron 47c0e0c312 Replace previous Sun Microsystems, Inc. license with a standard
BSD 3-clause license granted by Oracle America, Inc..
This license change was approved by Wim Coekaerts, Senior Vice President,
Linux and Virtualization at Oracle Corporation.

This fixes PR lib/45293 by Pedro Giffuni.
2013-03-11 20:19:28 +00:00
yamt 7c323d8879 fix rev.1.13 2013-03-11 10:44:43 +00:00
christos e04ecc45a2 PR/47631: NAKAJIMA Yoshihiro
1. Utimens and lutimens don't require timeval but timespec.
2. The order of functions doesn't have a uniformity.
3. Utimens.2 and lutimens.2 aren't installed.
2013-03-08 16:52:11 +00:00
christos ca46014bf8 Overly aggressive long->zic_t conversion.
I should add zic_t to the dictionary instead.
2013-03-06 18:40:19 +00:00
christos 5828353b59 change %ld to %jd 2013-03-06 18:21:18 +00:00
christos 09953b1d89 - change zic_t to intmax_t and friends suggested by apb
- change long to zic_t suggested by Paul Eggert
- remove unused constants
2013-03-06 18:19:07 +00:00
yamt 2c9fdc9222 comment and assertion 2013-03-06 11:29:01 +00:00
yamt 0501b18883 wrap a long line 2013-03-06 11:27:46 +00:00
yamt d48c7c8537 remove unnecessary casts 2013-03-06 11:27:28 +00:00
christos 2dec884d64 make this usable from RUMP 2013-03-05 19:55:22 +00:00
enami de0e018a8c - Refer the argument with correct name.
- Mark up the function as a function like rest of this paragraph does.
2013-03-05 03:11:27 +00:00
soda ac809960e5 a sequel to getcwd.c revision 1.52 and realpath.3 revision 1.13 by christos:
explicitly mention that NULL is allowed as second argument
in the description part as well.

PR/46618: Onno van der Linden: realpath(3) isn't SUSv4 compliant (and causes
flactag 2.0.4 to dump core). Fix to accept a NULL argument for resolvedpath.
2013-03-05 02:46:33 +00:00
joerg bd48a85600 usage is dead. 2013-03-04 21:18:51 +00:00
christos 4ce5b0bd1b PR/47617: Thorsten Brehm: Memory and socket leak in librpc 2013-03-04 17:29:03 +00:00
christos e24729def6 fix error messages and warnings. 2013-03-04 17:17:56 +00:00
christos 94b98e2733 but don't lose our own extensions 2013-03-02 21:56:28 +00:00
christos 79072b5545 use correct types. 2013-03-02 21:39:48 +00:00
christos 6e1e799722 resolve more diff 2013-03-02 21:28:06 +00:00
christos ca5a334915 update to tzcode2013a 2013-03-02 21:24:28 +00:00
joerg e240adbd0b Retire OSI network stack. OK core@ 2013-03-01 18:25:13 +00:00
christos 7ecc2916f6 PR/13082: Thorsten Brehm: Fix wrong memcpy that caused possible memory
corruption. XXX: pullup to 6.
2013-02-26 16:33:57 +00:00
christos b1baeb1ce1 remove code that did special handling for . and .. at the end of the path.
From mouse@
2013-02-21 18:17:43 +00:00
joerg 2ef880c45c No ctassert in tool build 2013-02-21 16:21:20 +00:00
christos 43318fcb2c Minor nits, and make it compile in FreeBSD (NBBY needs sys/params.h) 2013-02-20 20:27:42 +00:00
christos 963defd907 we don't have multibyte.3 (yet) 2013-02-20 20:05:26 +00:00
tron d352d77a08 Don't declare a variable inside a "for" construct because it breaks the
tool build which doesn't use C99.
2013-02-20 19:59:34 +00:00
wiz 8c68be56af Sort SEE ALSO.
XXX: multibyte(3) is dangling.
2013-02-20 19:49:26 +00:00
christos 3e6d0c8c98 Make the masks 64 bit wide so that they fit 6 character wide conversions.
Explain what's wrong with MB_LEN_MAX currently.
2013-02-20 18:40:49 +00:00
riz 6948e65203 Initialize 'clen' to 0, to avoid "may be used uninitialized" warning. 2013-02-20 18:09:13 +00:00
christos 1ee549bd74 Fix whitespace 2013-02-20 17:15:08 +00:00
christos 88d1b254b8 More fixes from J.R. Oldroyd. We introduce a new function that can
retrieve and return if there has been a conversion error, so that
it can keep performing char-by-char processing if a multi-byte
conversion occurred. Also some more code cleanups in the "extra"
processing.
2013-02-20 17:01:15 +00:00
para bc91d7fa79 two more type casts after type changes 2013-02-16 13:45:45 +00:00
christos 61fab15480 more type changes 2013-02-16 13:37:01 +00:00
christos 72e5329b53 using the proper types eliminate a whole bunch of casts 2013-02-16 13:29:34 +00:00
christos 650d188146 - make all filedescriptors close-on-exec
- use SOCK_NOSIGPIPE.
- add kqueue handling (not enabled by default, from FreeBSD)
- add RES_INSECURE1 handling (from FreeBSD)
2013-02-15 14:08:25 +00:00
martin 38e436ce90 While we are using softfloat for 128 bit long double values, make fpsetround
update the softfloat rounding mode as well.
2013-02-15 09:25:03 +00:00
martin 33794f1e61 Make all conversions from 128bit (long double) floats to integral types
use rounding towards zero (casts to int/long are not affected by current
rounding mode).
Fixes PR port-sparc64/47535.
2013-02-15 09:24:05 +00:00
christos 66ae8c4557 More fixes from: J.R. Oldroyd
- The input loop control that I changed yesterday to:
	while (mbslength >= 0) {
  There are circumstances where this causes an extra \000 to
  be added at the end of some tests.  This error was showing
  in my own tests here, but I did not notice it yesterday.
  (I really need to add my tests to the test suite, catching
  every error by eye is hard.)  To fix, I've now changed the
  code to increment mbslength only if mbslength == 1 to start
  with.  (Note that this check for "== 1" is why the arg to
  strvisx() in vis(1) must be 1, not mbilen.)

- The cast sequence when manually inserting bytes after a
  multibyte conversion error:
	*src = (wint_t)(u_char)*mbsrc;
  is wrong.  This is causing problems in the case when an
  8859-1 input string is processed in the UTF-8 locale.
  It needs to be:
	*src = (wint_t)*mbsrc;
  Without the (u_char) all the locale mismatch combinations
  then work.

- The code:
	if (mblength < len)
		len = mblength;
  needs to be there.  It resets len for the single character
  input case after we've actually processed two input
  characters (c and nextc) because we incremented mbslength
  at the start of the loop.  Without this code, single
  character conversions end up with a \000 or other byte
  appended.
2013-02-15 00:28:10 +00:00
christos c64f43b851 off by one. 2013-02-14 13:57:53 +00:00
wiz 4029d1a5ce Fix typo in error code; from Henning Petersen in PR 47565.
While here, sort errors.
2013-02-14 09:31:48 +00:00
wiz 0dab657ed9 Mark up LC_CTYPE as environment variable. 2013-02-13 22:19:48 +00:00
christos b4ca5d44a0 remove patch botches. 2013-02-13 22:19:18 +00:00
christos bab4584669 multi-byte doc from J.R. Oldroyd 2013-02-13 22:17:12 +00:00
christos 7ac573dac7 Fix from J.R. Oldroyd for wide chars > 2 2013-02-13 22:15:43 +00:00
christos a41a849901 Handle invalid character sequences. 2013-02-13 15:22:09 +00:00
pooka a42a57f022 Match prototype with reality to fix tool build on platforms where
wint_t != int.
2013-02-13 12:15:09 +00:00
christos 6f46fd439e explain we we want wide character support here. 2013-02-13 04:58:17 +00:00
christos ec33e596f5 Wide char support from J.R. Oldroyd 2013-02-13 04:49:59 +00:00
joerg 6c3b61dddd Remove remnants of AF_IMPLINK. 2013-02-05 17:30:01 +00:00
wiz 8e0e98065f Xref getcwd(3).
Sort errors.
Bump date.
2013-02-05 13:36:59 +00:00
wiz 49573e6ea1 Bump date for previous. 2013-02-04 20:03:11 +00:00
njoly c6bbf9b2f9 According to the opengroup document [1], we should include fcntl.h (not
sys/fcntl.h) for posix_fadvise().

[1] http://pubs.opengroup.org/onlinepubs/009695399/functions/posix_fadvise.html
2013-02-04 19:29:38 +00:00
matt f3e2916319 Add hardfloat version of fabs using the vabs.f64 instruction 2013-02-03 07:14:41 +00:00
matt c2bb80258f Add support for earmhf and earmhfeb and add SRCS.hardfloat. 2013-02-03 01:55:19 +00:00
matt 5e9ff8d257 include <arm/vfpreg.h> 2013-02-03 01:50:54 +00:00
matt 90408fa94f Adapt to earm hard float by including softfloat-for-gcc.h even if __ARM_EABI__
so we can get the __aeabi aliases.
2013-02-03 01:48:53 +00:00
christos 0465120426 include private.h to get access to TM_GMTOFF 2013-01-31 15:47:53 +00:00
matt 8c98e4a90f Reorganize to appease lint. 2013-01-31 06:47:55 +00:00
matt 23ce88cd93 AAPCS (EABI) requires that VFP D8-D15 are always saved, regardless whether
the soft float or hard float ABI is being used.  However, if there isn't a
FPU that can't be done.  So only save/restore them if a FPU is present. When
libc initializes, it does a sysctl to determine if there is a FPU and stores
the result which _setjmp/setjmp uses.  If there was a FPU, the magic in the
jmp_buf is changed to reflect that the VFP registers were saved.  longjmp uses
the magic to determine if it needs to restore the VFP registers.
2013-01-29 19:23:09 +00:00
matt eafb63402e for earm*, add arm_initfini.c 2013-01-29 19:15:52 +00:00
matt c910167987 Add a constructor for EABI to determine if a FPU is present on the system. 2013-01-29 19:14:54 +00:00
matt ec3a3eac3f Add ${ARCHDIR}/misc to path 2013-01-29 19:14:02 +00:00
matt ce0c445114 When building for earm*, compile __aeabi_[df]cmpun.c and __aeabi_[il]div0.c 2013-01-26 07:09:41 +00:00
matt 44fb56c3b5 Appease clang by making 64-bit literals use ULL 2013-01-26 07:08:14 +00:00
matt 89bd1391e1 Add __aeabi_[fd]cmpun for IEEE unordered compares (requires by ARM RTABI). 2013-01-26 07:04:22 +00:00
wiz 94a4d029bf Replace dagger ("\(dg") with hash mark ("#") for marking up differences.
Dagger wasn't displayed on terminals and replaced with a minus, which
was hard to read.

Requested by agc.
2013-01-25 11:51:42 +00:00
matt b9421e37cf Use __ARM_PCS_VFP to determine whether the VFP is being used. 2013-01-25 08:52:16 +00:00
matt 2b36c3f081 Add simple version of strncat for ARM. 2013-01-23 05:44:52 +00:00
uwe 3d030c8904 Mark up occurence of printf() in text with .Fn 2013-01-20 11:01:17 +00:00
uwe dd48d6e3aa In newfmt() example one level of indentation is enough. 2013-01-20 10:57:19 +00:00
uwe ad85e477e1 Fix typo. 2013-01-19 15:25:58 +00:00
apb 1a0c3376f6 Document the fact that ctime_rz, localtime_rz, and mktime_z,
accept a NULL timezone_t pointer as a reference to UTC,
and the fact that tzalloc accepts a NULL zone name.
2013-01-19 11:56:17 +00:00
dholland ab137c90f7 Revert defective O_SEARCH implementation committed by manu@ along with
the *at system calls on November 18th of last year. Reasons to revert
it include:
   - it is incorrect in a whole variety of ways (but fortunately, one
     of them is that the missing and improper permission checks have
     no net effect);
   - it was committed without review or discussion;
   - core ruled that all the new O_* flags pertaining to the *at calls
     needed to wait until their semantics could be clarified.

manu was asked to revert it on these grounds but has ignored the request.

I have left O_SEARCH defined and visible and made open() explicitly
ignore it. This way, most code that tries to use it will continue to
build and run. I've also arranged lib/libc/c063/t_o_search.c so that
the tests that make use of the O_SEARCH semantics will disappear until
O_SEARCH comes back, and fixed some mistakes and/or incorrect hacks
that were causing some of these to succeed despite the broken O_SEARCH
implementation.
2013-01-13 08:15:02 +00:00
dholland 1239b9dce6 One more bit: explicitly state what calls to faccessat() are equivalent
to access().
2013-01-12 19:21:48 +00:00
dholland c0a0e3174b Rewrite heavily. This was originally going to be just an improvement of
some wording related to the *at form... but it needed a general overhaul.

Add some missing errors for the *at form... plus EINVAL for the
traditional form for when you pass a bogus check mode.

Note that the AT_EACCESS flag is useless and strengthen the security
warning.
2013-01-12 19:19:24 +00:00
matt 60e851836f Remove all FPA code.
Support VFP for hard float
Allow MKSOFTFLOAT=no
2013-01-11 13:55:25 +00:00
matt 536ad83369 Add hooks to softfloat to support per-lwp exception state. 2013-01-10 08:16:10 +00:00
wiz b1a47481aa Remove trailing whitespace. 2013-01-08 19:55:43 +00:00
dholland 2f4276ca8c Rework the description of the const issue to improve the wording,
avoid saying "we", fix typos, etc.

XXX: groff and mandoc handle the URLs in here differently but both
XXX: mangle them, apparently because they're wider than one line.
XXX: Does anyone know how to fix this or do we need an URL shortener
XXX: on www.NetBSD.org?
2013-01-08 19:19:24 +00:00
wiz e17e68c7fd Use Lk for links. 2013-01-04 07:27:57 +00:00
christos 1decb32e9b Explain why we did not follow the standard.
Worth revisiting the proposal:
http://marc.info/?l=netbsd-tech-userlevel&m=110019726222841
2013-01-04 01:21:45 +00:00
dholland 2d1469952b typo in comment, from Abhinav Upadhyay in PR 47385 2012-12-30 21:23:20 +00:00
wiz 695c00c96b Add "wide" to description. From OpenBSD via Ingo Schwarze. 2012-12-28 13:53:12 +00:00
christos 7c894664c7 Instead of changing the code to match the documentation, change the documentation
to match the code. NOCHECK is used only by csh(1) and csh(1) is too broken for
words (histchars quoting is "special").
2012-12-27 21:17:47 +00:00
martin 96ee7c5e41 Add fpclassify{,d} 2012-12-27 10:41:18 +00:00
martin 9200e999a5 Avoid gcc 4.5.3 compiler bug on ia64 by compiling hesiod.c with -O1 only. 2012-12-27 07:08:59 +00:00
christos 769edb4d8a Do as the man page says, and for GLOB_NOCHECK return the original pattern,
not a modified version with the backslash characters removed.
2012-12-18 01:39:56 +00:00
wiz f1de633660 Add article. Remove trailing whitespace. 2012-12-15 07:34:36 +00:00
wiz 9e04985eb5 Add article. 2012-12-15 07:34:24 +00:00
matt 4e8ff3d837 Since the struct is const, no reason for the name member to be const. 2012-12-15 04:29:53 +00:00
uwe 4302f11726 Add BUGS section that explains that names VIS_HTTP1808 and VIS_HTTP1866
are wrong (hi, christos).

ok christos@
2012-12-15 02:38:46 +00:00
uwe dafbf6787b RFC 1866 does not define any "URI encoding". It defines HTML 2.0 that
includes SGML numerical character references (&#nnn;) and entity
references (&foo;) for Added Latin 1 and a subset of Numeric and
Special Graphic.
2012-12-15 02:08:13 +00:00
uwe 6e92cc1004 Minor markup fixes. 2012-12-15 01:50:06 +00:00
uwe 1ace9ea358 Add RFC 2045 (for VIS_MIMESTYLE) to "SEE ALSO".
Use space between "RFC" and the number.
2012-12-15 01:19:32 +00:00
uwe e7511e034d Misc formatting fixes. 2012-12-15 01:04:02 +00:00
uwe 1b908ff925 Typos: fix -> fit; length size -> size. 2012-12-15 01:02:26 +00:00
uwe df29ecae5b Fix pasto: VIS_MIMESTYLE produces =XX, not %XX 2012-12-15 00:48:19 +00:00
uwe 6acbdc7985 And two more pastos in examples: December and January are in standard EST,
not daylight saving EDT.
2012-12-14 23:26:17 +00:00
uwe 367bc13515 Fix two more pastos in examples. 2012-12-14 23:16:11 +00:00
uwe 8cc39c0c9f Fix pasto in example template. 2012-12-14 23:00:21 +00:00
uwe 4636daa9fd Use .Vt for types. Don't use .Pq - it formats funny in PostScript and
plain parens do just fine here.
2012-12-14 22:57:00 +00:00
christos 63f7f95ff8 fix pasto (Brooks Davies) 2012-12-14 22:55:59 +00:00
uwe 0c65b28c80 Fix table formatting. 2012-12-14 22:33:17 +00:00
khorben fa46f3adf7 Fixed a typo within the examples 2012-12-14 22:22:51 +00:00
christos 1f58e80eec Add VIS_GLOB (Brooks Davies) 2012-12-14 21:38:18 +00:00
christos 05b06ffddc Reduce the number of relative relocation by allocating space in the
structure directly (Jilles Tjoelker @ FreeBSD)
2012-12-14 21:31:01 +00:00
wiz a8352d9716 Bump date. New sentence, new line. Wording/articles.
Sort errors while here.
2012-12-01 21:07:00 +00:00
wiz df30358ee8 Bump date. New sentence, new line. Wording/articles.
Sort errors while here.
2012-12-01 21:00:18 +00:00
wiz 00c15860d1 Bump date, really. 2012-12-01 20:57:41 +00:00
wiz 1ef05d0df5 Bump date. New sentence, new line. Wording/articles.
Sort errors while here.
2012-12-01 20:53:10 +00:00
wiz d4e1a73a59 Bump date. New sentence, new line. Wording/articles. 2012-12-01 20:51:29 +00:00
wiz 017d301f38 Bump date. New sentence, new line. Wording/articles.
While here, sort errors.
2012-12-01 20:50:19 +00:00
wiz 947bcf9e3f Bump date. New sentence, new line. Wording/articles. 2012-12-01 20:48:26 +00:00
wiz dafc6bcd71 New sentence, new line. Add articles. 2012-12-01 20:46:54 +00:00
wiz 3e961cd531 Remove trailing whitespace. 2012-12-01 20:45:01 +00:00
matt b160e122c8 Add missing registers. 2012-11-28 02:18:24 +00:00
christos 7655db5ec2 fix lint. 2012-11-24 15:20:58 +00:00
christos 33b3ee33ee mention that kevent returns now EOPNOTSUPP. 2012-11-24 15:16:52 +00:00
christos bbd1e49222 Use __arraycount(), and cast to u_int. 2012-11-24 07:16:04 +00:00
christos c867d6c9e1 don't compile the libc stuff twice. 2012-11-22 20:22:31 +00:00
abs 2a29d4b2b4 - Correct macro usage;
- sort section order.

From Bug Hunting.
2012-11-22 16:19:49 +00:00
matt 19392803b5 Add $NetBSD$ tag. Use ip to save r1 instead of the stack. 2012-11-20 22:02:46 +00:00
manu a76c1cc17f Add most system calls for POSIX extended API set, part 2, with test cases:
faccessat(2), fchmodat(2), fchownat(2), fstatat(2), mkdirat(2), mkfifoat(2),
mknodat(2), linkat(2), readlinkat(2), symlinkat(2), renameat(2), unlinkat(2),
utimensat(2), openat(2).

Also implement O_SEARCH for openat(2)

Still missing:
- some flags for openat(2)
- fexecve(2) implementation
2012-11-18 17:41:51 +00:00
he 341f22eefb Fix make syntax problem by putting the condition on the same line as .elif. 2012-11-16 12:38:09 +00:00
christos 6237b29afd fix the part of the code that does not get usually compiled in libc. 2012-11-15 16:43:30 +00:00
christos 42837a5b3c Add 'x' to the mode bits to specify O_EXCL, like glibc. 2012-11-15 03:50:36 +00:00
msaitoh 71f1d3fc0f For arm, add -fno-tree-vrp to COPTS when compiling softfloat.c.
Without -fno-tree-vrp, -INF + -INF returns 0 by adddf3.
Fixes PR#46953.
2012-11-14 03:47:30 +00:00
christos 6d9727ba24 fix outdated includes list. 2012-11-07 15:48:13 +00:00
wiz 443fa8fc45 NL -> . to improve output 2012-11-06 23:25:44 +00:00
uwe 3551775cc1 Mention sigevent(3) not only in DESCRIPTION but in SEE ALSO as well. 2012-11-06 21:16:21 +00:00
uwe ffccaf97fd Fix another typo. 2012-11-06 15:26:37 +00:00
uwe bce1bfa71d Fix typo. 2012-11-06 15:23:24 +00:00
wiz c82468c671 Bump date for previous. Grammar fix. 2012-11-04 10:57:33 +00:00
christos ff84366ca6 add utimens and lutimens wrappers using utimensat. 2012-11-03 19:39:21 +00:00
wiz 9491c7bdbf Remove trailing whitespace. 2012-11-03 00:52:41 +00:00
christos edeb5b3cd1 Add _SC_PHYS_PAGES 2012-11-02 21:43:07 +00:00
christos febe1abc11 add new files to fix static linking 2012-10-30 12:42:37 +00:00
christos fb6139e643 add a cast to appease the compat build. 2012-10-28 19:02:29 +00:00
christos 2f573b07f7 welcome to tzcode2012h via patch. 2012-10-28 17:11:33 +00:00
christos 7d8ba7bfb5 stronger lint foo 2012-10-26 23:23:23 +00:00
christos 4295620388 - whitespace
- s/consttmp/const tmp/
- sync comments
- don't save errno where it is not needed
- consistent lint comments
2012-10-26 18:31:14 +00:00
christos 4c9b20d676 consistent lint commments 2012-10-26 18:30:11 +00:00
christos 11571e6e08 remove unused constant 2012-10-26 18:29:49 +00:00
christos a8bd22430c remove register 2012-10-26 18:29:34 +00:00
martin a5430d17c3 Revert previous - casting to long is a bad idea, as the value will overflow.
Pointed out by apb.
2012-10-25 15:04:05 +00:00
martin f5962309a9 Add a few casts to avoid (IMHO bogus) gcc warnings breaking the vax build. 2012-10-25 13:14:32 +00:00
wiz 76b8df0e8c Whitespace improvements. 2012-10-24 22:56:27 +00:00
christos 429bc5b7d7 explain a bit more what's wrong with alloca(3) 2012-10-24 22:25:49 +00:00
christos 97d3085eb3 Add a warning when we are using the libc version of alloca(3). 2012-10-24 22:10:52 +00:00
joerg 570a37472e Remove alloca when we get a chance to avoid issues like PR lib/47120.
With an modern optimising compiler, backend integration is necessary as
soon as frame pointers are optional.
2012-10-24 20:14:55 +00:00
christos 0b25fef287 remove error(1) output. 2012-10-24 00:30:52 +00:00
christos fb0d3fd558 apply 2012g via patch 2012-10-24 00:10:03 +00:00
apb 977d0ed33c Use the correct field name when describing the equivalence between
ptsname(3) and ioctl TIOCPTSNAME.  It should be pm.sn, not pm.ps.
2012-10-19 10:44:34 +00:00
drochner e61202360d fix trivial typo in warning msg 2012-10-17 16:09:03 +00:00
msaitoh 2d0deef114 -Wstrict-overflow 2012-10-15 22:22:01 +00:00
dholland 8b39f69929 typo 2012-10-14 08:49:28 +00:00
njoly b6d38f1490 Remove some more unneeded Pp macros. 2012-10-13 15:28:33 +00:00
christos a9bb3b0c76 take care of the signal safe syslog calls which are not exposed. 2012-10-11 17:09:55 +00:00
christos 156eeee6c3 add more locking (when we read and write fields) 2012-10-10 23:53:43 +00:00
christos fea19ff7ed Add compat functions for syslog. 2012-10-10 22:52:26 +00:00
christos 6a113fa20a PR/47055: David Holland: Remove static hostname and store the hostname in
syslog_data. Initialize hostname before it is used. While here, add a version
to syslog_data.
2012-10-10 22:50:51 +00:00
christos 09560d8fbc add split files 2012-10-10 02:15:03 +00:00
njoly 17568cd1bf Kill some extra spaces in function arguments. 2012-10-08 18:15:09 +00:00
njoly aa8d6d6d73 Function argument Fa macro expects its name on the same line. 2012-10-08 18:08:40 +00:00
wiz 1834bf7f98 Improve wording.
From Bug Hunting.
2012-10-03 19:28:44 +00:00
christos b856128072 add clock_nanosleep(2) 2012-10-02 01:46:40 +00:00
skrll 74f6af556a Remove magic numbers. 2012-09-27 11:20:20 +00:00
skrll 67a0557406 Fixup the stack pointer in the ucontext returned by getcontext.
This fixes the following tests

	lib/libc/sys/t_swapcontext.c
	lib/libpthread/t_swapcontext.c
2012-09-27 09:53:53 +00:00
joerg 270aa46424 Don't refuse the open databases without entries or keys, just protect
the divisions. cdbr_find and cdbr_get already have the appropiate
checks.
2012-09-27 00:37:43 +00:00
christos 911623fbd4 add and document AF_LOCAL (and the rest that were not) 2012-09-26 23:13:00 +00:00
msaitoh c1c5c6072d Fix in comment. 2012-09-26 15:33:43 +00:00
spz 411032beb5 remove dubious cast 2012-09-15 19:31:12 +00:00
martin 25aaf6211d Fix register usage 2012-09-13 11:47:46 +00:00
manu eed5245297 Fix the build, _UC_UNIQUE has been renamed _UC_TLSBASE 2012-09-12 14:13:43 +00:00
manu bba80928a8 setcontext() used to be incompatible with -lpthread since it affected
the TLS pointer, therefore wrecking the pthread environement.

Some ports had _UC_TLSBASE flag or equivalent (_UC_UNIQUE on alpha)
that controlled whether setcontext() would change the TLS pointer.
This change let libpthread override setcontext() with its own version
that unsets _UC_TLSBASE, enabling safe usage of setcontext() with
-lpthread.

We also have the following required changes here:
- rename alpha's _UC_UNIQUE into _UC_TLSBASE
- add _UC_TLSBASE definition in header file for all ports
  (powerpc, sh3, sparc and sparc64 lack the implementation for now)
- introduce a libc stub that can be overriden for setcontext()
- modify MD libcs swapcontext() implementations so that they use the
  setcontext() libc stub instead of doing a plain system call.

While we are there:
- document various MD _UC_* flags in header file
- add libc and libpthread tests for swapcontext() behavior
  (hopefully helpful to spot MD problems introduced with this change)

Future work:
- Deciding whether kernel support or _UC_TLSBASE should be added for
  powerpc, sh3, sparc and sparc64 is left to portmasters
  sparc64

Approved by core@
2012-09-12 02:00:51 +00:00
christos 2a7b0a49fb add a check-names option, now that the default is no-check-names 2012-09-09 18:04:26 +00:00
christos 98fae1dfe3 implement no-check-names 2012-09-09 16:42:23 +00:00
dholland 8df67510ff Revert previous temporary measure and fix the assertion properly instead. 2012-09-08 15:15:06 +00:00
dholland 9af1ccf1bf Disable bogus _DIAGASSERT. 2012-09-07 04:50:35 +00:00
drochner 0e9330ed96 Align the stack to a 16-byte boundary on LWP creation.
This is more than required by the ABI, but it makes programs using SSE
in a thread work without extra compiler flags or performance hit.
2012-08-31 20:57:24 +00:00
drochner 8588929dc5 Add "consttime_bcmp" and "explicit_bzero" functions for both kernel
abd userland, as proposed on tech-security, with explicit_bzero using
a volatile function pointer as suggested by Alan Barrett.
Both do what the name says. For userland, both are prefixed by "__"
to keep them out of the user namespace.
Change some memset/memcmp uses to the new functions where it makes
sense -- these are just some examples, more to come.
2012-08-30 12:16:48 +00:00
dholland 8c41afe697 Check for NULL *before* using ALIGN().
I don't remember what prompted this, but it's obviously a desirable fix
and I've been carrying it on a heavily-used machine for more than a year.
2012-08-29 18:50:35 +00:00
dholland 7376117cc5 Some more notes for libc bump time that I had lying around. 2012-08-24 06:12:52 +00:00
dsl e2ff5b6fd5 I'm fairly sure the libc rules require that arc4random_addrandom,
arc4random_buf, arc4random_stir and arc4random_uniform be weak.
2012-08-20 21:38:09 +00:00
dsl 75ea4d15ba arc4 is a random number sequence, there is no point using its own
output values to determine a number of output values to skip.
Skipping values on any possibly random event might be worth while, as
  might using the keying algorithm to stir in a possibly random value.
2012-08-20 20:32:09 +00:00