Commit Graph

10222 Commits

Author SHA1 Message Date
christos
c7db9c14b4 return 0 on unsupported bases. 2016-10-04 12:48:15 +00:00
wiz
33e9a4f901 Fix xref. 2016-10-04 10:46:40 +00:00
kamil
7f4b5eb156 Add timespec_get(3) in <time.h> and enable unconditionally struct timespec
These changes conforms to the C11 standard
References:
 - 7.27.1/3 Components of time (struct timespec)
 - 7.27.2.5 The timespec_get function

According to ISO/IEC 9899:201x (draft) <time.h> defines the timespec
structure and declares the timespec_get(3) function with TIME_UTC
definition.

According to a C++17 standard draft <ctime> offers the same interface in
the std:: namespace.

The timespec_get function modifies the timespec object pointed by ts
to hold the current calendar time in the given base. The standard notes
only the TIME_UTC base with implementation defined value, set it to 1
as zero is reserved for error handling. Once operation was successful this
function returns passed base, otherwise exits with zero.

The timespec struct was already part of the POSIX standard in <time.h>.

Enable this interface unconditionally in the header to allow to use it
in a code prior C11 and C++17 as an extension.

Review notes from <christos>
2016-10-04 09:41:40 +00:00
dholland
8536f06c47 Be more careful about preserving errno. Might conceivably be related
to PR 51432.
2016-09-30 06:22:21 +00:00
dholland
48faaeec69 Be consistent about returning -1 on error. Don't return random errnos
instead.
2016-09-30 06:16:47 +00:00
wiz
d6414e373d Remove duplicate Pp. 2016-09-27 11:11:43 +00:00
christos
aae80e6be7 remove mpool_getf 2016-09-24 21:31:25 +00:00
christos
f3f19d16f2 bump for the flags version of db routines 2016-09-24 20:12:07 +00:00
christos
86147b1c32 Merge the recursive tree traversal changes from the mit kerberos tree. This
Also make the tracefile customizable. Unfortunately we can't merge any of
the hash changes because they have a different on-disk format. That does not
matter really because we've fixed most of the problems...
2016-09-24 20:11:12 +00:00
christos
d42d73761d When writing out pages in the "other endian" format, make a copy instead of
trashing the in-memory one.
2016-09-24 20:08:29 +00:00
christos
a49c1d21d7 move the description of CLOCK_REALTIME in the list. 2016-09-24 01:05:51 +00:00
pgoyette
9a9ece3b27 Since the argument buf is earlier described as a buffer, replace all
references to "the array" with "the buffer" for consistency.

Bump date.
2016-09-22 23:18:10 +00:00
roy
72d40e7cf4 Bump libc version for ifaddrs. 2016-09-21 10:54:36 +00:00
roy
45b7bd08f6 Add ifa_addrflags to ifaddrs. 2016-09-21 10:53:24 +00:00
skrll
46ef072377 Fix for [on]{32,64}
/usr/tests/lib/libc/sys/t_getcontext
/usr/tests/lib/libc/sys/t_swapcontext
/usr/tests/lib/libc/sys/t_ucontext
/usr/tests/lib/libpthread/t_swapcontext

All pass now.

Changes amount to

- saving GP from caller in context for n{32,64}
- performing (the equivalient of) PIC_PROLOGUE for swapcontext and
  __resumecontext
- Call setcontext via the PLT in __resumecontext
2016-09-21 06:49:39 +00:00
skrll
ed78dc9b59 Trailing whitespace. 2016-09-21 06:41:42 +00:00
christos
a4f5c51335 use a define, and cast. 2016-09-20 15:03:07 +00:00
christos
42bfe206ef put back part of the code that determines the smallest of INT_MAX and
SIZE_MAX to avoid llvm truncation warning.
2016-09-20 13:09:08 +00:00
christos
5698ccad84 PR/51484: gson@: Fix off by one (wrong merge) 2016-09-19 18:43:23 +00:00
christos
16bd23da7a welcome to tzcond-2016f 2016-09-16 17:12:06 +00:00
joerg
0f37b1b875 gethostbyname_r should die. 2016-09-15 16:23:05 +00:00
joerg
0f183be635 Bump the glob limits to 512KB for total string size and 64K path
entries. The old limits were too small for some important FTP use cases
like a pkgsrc repository.
2016-09-04 18:27:08 +00:00
christos
d2f713bbd1 don't shortcut closing if the metadata is dirty (from the krb5 tree) 2016-08-31 06:23:51 +00:00
wiz
0c9a844188 Merge ENOMEM descriptions. 2016-08-28 05:07:50 +00:00
dholland
880009a06c fix broken xrefs 2016-08-28 00:15:01 +00:00
dholland
c959793a57 Rework pursuant to PR 7934: be more clear about the page granularity
behavior and when new memory is zeroed.

Also, strengthen the warning about mixing with calls to malloc (which
is not a bug) and mention that the portable way to fetch the initial
break is to call sbrk(0). There are implementations in the wild where
using _end as the initial break doesn't work.
2016-08-27 23:06:01 +00:00
christos
e222705068 Improvements to fgetwln(3) from Andrey Chernov:
1) Set the stdio error indicator on __slbexpand() failure.

2) fgetwc(3) may succeed even when ferror(3) is already set
   (for example, consider a program using SIG_IGN on SIGTTIN,
   reading from the tty while in the background, getting EIO,
   then coming to the foreground and reading again).
   So do not force fgetwln(3) to fail in such a case either.
   (Yes, the program should probably clearerr(3) before
   reading again, but let's be nicer in case it forgets.)
2016-08-27 13:15:48 +00:00
christos
bb5114e4e0 remove debugging 2016-08-27 09:35:13 +00:00
christos
a66a750e64 detect overflow in oldexp + newexp 2016-08-27 09:11:56 +00:00
dholland
8c87f52cc0 Add MLINKS for atomic_add_nv, atomic_cas_ni, and so forth - otherwise
you have to remember that they're the same page as plain atomic_add and
atomic_cas, or remember one of the types that they're defined on.
PR 51033.
2016-08-27 08:03:13 +00:00
christos
8c27d15300 missing _ 2016-08-22 07:41:10 +00:00
christos
a78f4eaca1 From OpenBSD:
bugfix: when fgetwc(3) fails, fgetwln(3) must fail as well;
2016-08-22 06:11:39 +00:00
skrll
97239cd361 Add a NOP_L 2016-08-13 08:09:17 +00:00
skrll
48bbbdf1d5 PIC_TAILCALL on n32/n64 would mess up GP, so just use SYSTRAP to call
setcontext.

Fixes tests/lib/libc/sys/t_getcontext.c:setcontext_link
2016-08-13 07:49:32 +00:00
skrll
24c5917e57 Provide _OFFSETOF_UC_GREGS_GP and use _OFFSETOF_UC_GREGS_* in getcontext 2016-08-12 15:26:04 +00:00
skrll
f820f85434 Trailing whitespace 2016-08-12 15:21:25 +00:00
skrll
21763d8f6e We need to save the GP of the caller in the context for n32/n64 2016-08-10 16:45:24 +00:00
skrll
7241a8c40f Fix comments 2016-08-10 16:40:24 +00:00
dholland
94048eede3 Typo. 2016-08-08 04:16:45 +00:00
scole
21984c24a3 PR port-ia64/51261
Add stubs for ia64 build
2016-08-05 16:40:47 +00:00
sevan
9d1016b7d6 Grammar 2016-08-04 16:36:45 +00:00
christos
c10c4abe0f Realtime signal support from GSoC 2016, Charles Cui. 2016-08-04 06:43:43 +00:00
ryoon
e2898a6bda Fix _SC_TIMER_MAX listing, bump date 2016-08-03 12:40:42 +00:00
wiz
6333fb3d2f Sort errors. 2016-07-30 11:31:00 +00:00
njoly
c38e2c9645 Remove obsolete BUGS section. getsockname(2) report sensible values
for bound UNIX domain sockets.
2016-07-30 11:10:40 +00:00
wiz
8cc73798f2 Remove one of the two SEE ALSO sections. 2016-07-25 22:00:36 +00:00
skrll
8f5f191a49 No need to define PSW_MBS as machine/psl.h provides it for us 2016-07-16 09:51:13 +00:00
wiz
c94dcc5db3 Fix mdoclint warnings. 2016-07-15 21:19:19 +00:00
riastradh
e37ca7a7a0 Number the properties. Identify the key erasure property by name. 2016-07-15 15:23:43 +00:00
abhinav
83de4e7bb8 Fix grammar. 2016-07-14 18:36:57 +00:00