| Commit message (Expand) | Author | Age | Files | Lines |
| * | fix feature test macro logic for _BSD_SOURCE•••in several places, _BSD_SOURCE was not even implying POSIX, resulting
in it being subtractive rather than additive (compared to the default
features).
| Rich Felker | 2013-08-02 | 3 | -7/+7 |
| * | add missing c++ extern "C" wrapping to link.h | Rich Felker | 2013-08-02 | 1 | -0/+8 |
| * | provide useless 64-bit fcntl macros with _LARGEFILE64_SOURCE•••this is all useless but part of the API, which is part of the
_GNU_SOURCE API, so something may need them.
| Rich Felker | 2013-08-02 | 1 | -0/+3 |
| * | add macros for new(ish) prctl commands | Rich Felker | 2013-07-30 | 1 | -0/+37 |
| * | fix some prctl macros that were incorrectly copied into this file | Rich Felker | 2013-07-30 | 1 | -3/+3 |
| * | add wrapper headers, with warnings, for various incorrect names under sys•••also add a warning to the existing sys/poll.h. the warning is absent
from sys/dir.h because it is actually providing a slightly different
API to the program, and thus just replacing the #include directive is
not a valid fix to programs using this one.
| Rich Felker | 2013-07-27 | 6 | -0/+11 |
| * | a few more fixes for unistd/sysconf feature reporting | Rich Felker | 2013-07-27 | 1 | -0/+1 |
| * | report presence of ADV and MSG options in unistd.h and sysconf | Rich Felker | 2013-07-26 | 1 | -0/+2 |
| * | report that posix_spawn is supported in unistd.h and sysconf | Rich Felker | 2013-07-26 | 1 | -0/+1 |
| * | fix incorrect type for new si_call_addr in siginfo_t•••apparently the original kernel commit's i386 version of siginfo.h
defined this field as unsigned int, but the asm-generic file always
had void *. unsigned int is obviously not a suitable type for an
address, in a non-arch-specific file, and glibc also has void * here,
so I think void * is the right type for it.
also fix redundant type specifiers.
| Rich Felker | 2013-07-24 | 1 | -3/+3 |
| * | add protocol families PF_IB and PF_VSOCK to socket.h•••linux commit 8d36eb01da5d371feffa280e501377b5c450f5a5 (2013-05-29)
added PF_IB for InfiniBand
linux commit d021c344051af91f42c5ba9fdedc176740cbd238 (2013-02-06)
added PF_VSOCK for VMware sockets
| Szabolcs Nagy | 2013-07-25 | 1 | -1/+5 |
| * | update siginfo according to linux headers•••linux commit a0727e8ce513fe6890416da960181ceb10fbfae6 (2012-04-12)
added siginfo fields for SIGSYS (seccomp uses it)
linux commit ad5fa913991e9e0f122b021e882b0d50051fbdbc (2009-09-16)
added siginfo field and si_code values for SIGBUS (hwpoison signal)
| Szabolcs Nagy | 2013-07-24 | 1 | -1/+13 |
| * | add PTRACE_PEEKSIGINFO to ptrace.h•••added in linux-v3.10 commit 84c751bd4aebbaae995fe32279d3dba48327bad4
using stdint.h types for the new ptrace_peeksiginfo_args struct
| Szabolcs Nagy | 2013-07-24 | 1 | -0/+11 |
| * | add if_ether.h constants ETH_P_802_3_MIN and ETH_P_BATMAN•••see linux commits 4f99ad51292078cc47343c17d3870764588cff73 and
e5c5d22e8dcf7c2d430336cbf8e180bd38e8daf1
| Szabolcs Nagy | 2013-07-24 | 1 | -0/+3 |
| * | add CLOCK_TAI (and CLOCK_SGI_CYCLE) clock ids to time.h•••added in linux-v3.10 commit 1ff3c9677bff7e468e0c487d0ffefe4e901d33f4
| Szabolcs Nagy | 2013-07-24 | 1 | -0/+2 |
| * | remove TCP_COOKIE_TRANSACTIONS from tcp.h•••removed in linux-v3.10 in commit 1a2c6181c4a1922021b4d7df373bba612c3e5f04
| Szabolcs Nagy | 2013-07-24 | 1 | -1/+0 |
| * | add SO_SELECT_ERR_QUEUE to socket.h•••introduced in linux-v3.10 commit 7d4c04fc170087119727119074e72445f2bb192b
| Szabolcs Nagy | 2013-07-24 | 1 | -0/+1 |
| * | change jmp_buf to share an underlying type and struct tag with sigjmp_buf•••this is necessary to meet the C++ ABI target. alternatives were
considered to avoid the size increase for non-sig jmp_buf objects, but
they seemed to have worse properties. moreover, the relative size
increase is only extreme on x86[_64]; one way of interpreting this is
that, if the size increase from this patch makes jmp_buf use too much
memory, then the program was already using too much memory when built
for non-x86 archs.
| Rich Felker | 2013-07-24 | 1 | -7/+6 |
| * | undefine internal-use type macros at the end of alltypes.h•••this patch is something of a compromise for a compatibility
regression discovered after the header refactoring: libtiff uses
_Int64 for its own use. this is absolutely wrong, invalid C, and
should not be supported, but it's also frustrating for users when code
that used to work suddenly breaks.
rather than leave the breakage in place or change musl internals to
accommodate broken software, I've found a change that makes the
problem go away and improves musl. by undefining these macros at the
end of alltypes.h, the temptation to use them in other headers is
removed. (for example, I almost used _Int64 in sys/types.h to define
u_int64_t rather than adding it back to alltypes.h.) by confining use
of these macros to alltypes.h, we keep it easy to go back and change
the implementation of alltypes later, if needed.
| Rich Felker | 2013-07-22 | 1 | -0/+4 |
| * | move register_t and u_int64_t (back) to alltypes•••during the header refactoring, I had moved u_int64_t out of alltypes
under the assumption that we could just use long long everywhere.
however, it seems some broken applications make inconsistent mixed use
of u_int64_t and uint64_t, resulting in build errors when the
underlying type differs.
| Rich Felker | 2013-07-22 | 2 | -2/+7 |
| * | fix regression in size of nlink_t (broken stat struct) on x86_64•••rather than moving nlink_t back to the arch-specific file, I've added
a macro _Reg defined to the canonical type for register-size values on
the arch. this is not the same as _Addr for (not-yet-supported)
32-on-64 pseudo-archs like x32 and mips n32, so a new macro was
needed.
| Rich Felker | 2013-07-22 | 1 | -1/+1 |
| * | make regoff_t and regex_t match C++ ABI•••for regoff_t, it's impossible to match on 64-bit archs because glibc
defined the type in a non-conforming way. however this change makes
the type match on 32-bit archs.
| Rich Felker | 2013-07-22 | 2 | -3/+3 |
| * | make pthread_key_t unsigned to match ABI | Rich Felker | 2013-07-22 | 1 | -1/+1 |
| * | make pthread attribute types structs, even when they just have one field•••this change is to get the right tags for C++ ABI matching. it should
have no other effects.
| Rich Felker | 2013-07-22 | 1 | -3/+3 |
| * | change wint_t to unsigned•••aside from the obvious C++ ABI purpose for this change, it also brings
musl into alignment with the compiler's idea of the definition of
wint_t (use in -Wformat), and makes the situation less awkward on ARM,
where wchar_t is unsigned.
internal code using wint_t and WEOF was checked against this change,
and while a few cases of storing WEOF into wchar_t were found, they
all seem to operate properly with the natural conversion from unsigned
to signed.
| Rich Felker | 2013-07-22 | 3 | -4/+4 |
| * | refactor headers, especially alltypes.h, and improve C++ ABI compat•••the arch-specific bits/alltypes.h.sh has been replaced with a generic
alltypes.h.in and minimal arch-specific bits/alltypes.h.in.
this commit is intended to have no functional changes except:
- exposing additional symbols that POSIX allows but does not require
- changing the C++ name mangling for some types
- fixing the signedness of blksize_t on powerpc (POSIX requires signed)
- fixing the limit macros for sig_atomic_t on x86_64
- making dev_t an unsigned type (ABI matching goal, and more logical)
in addition, some types that were wrongly defined with long on 32-bit
archs were changed to int, and vice versa; this change is
non-functional except for the possibility of making pointer types
mismatch, and only affects programs that were using them incorrectly,
and only at build-time, not runtime.
the following changes were made in the interest of moving
non-arch-specific types out of the alltypes system and into the
headers they're associated with, and also will tend to improve
application compatibility:
- netdb.h now includes netinet/in.h (for socklen_t and uint32_t)
- netinet/in.h now includes sys/socket.h and inttypes.h
- sys/resource.h now includes sys/time.h (for struct timeval)
- sys/wait.h now includes signal.h (for siginfo_t)
- langinfo.h now includes nl_types.h (for nl_item)
for the types in stdint.h:
- types which are of no interest to other headers were moved out of
the alltypes system.
- fast types for 8- and 64-bit are hard-coded (at least for now); only
the 16- and 32-bit ones have reason to vary by arch.
and the following types have been changed for C++ ABI purposes;
- mbstate_t now has a struct tag, __mbstate_t
- FILE's struct tag has been changed to _IO_FILE
- DIR's struct tag has been changed to __dirstream
- locale_t's struct tag has been changed to __locale_struct
- pthread_t is defined as unsigned long in C++ mode only
- fpos_t now has a struct tag, _G_fpos64_t
- fsid_t's struct tag has been changed to __fsid_t
- idtype_t has been made an enum type (also required by POSIX)
- nl_catd has been changed from long to void *
- siginfo_t's struct tag has been removed
- sigset_t's has been given a struct tag, __sigset_t
- stack_t has been given a struct tag, sigaltstack
- suseconds_t has been changed to long on 32-bit archs
- [u]intptr_t have been changed from long to int rank on 32-bit archs
- dev_t has been made unsigned
summary of tests that have been performed against these changes:
- nsz's libc-test (diff -u before and after)
- C++ ABI check symbol dump (diff -u before, after, glibc)
- grepped for __NEED, made sure types needed are still in alltypes
- built gcc 3.4.6
| Rich Felker | 2013-07-22 | 18 | -87/+133 |
| * | add UIO_MAXIOV macro in sys/uio.h•••while there's no POSIX namespace provision for UIO_* in uio.h, this
exact macro name is reserved in XBD 2.2.2. apparently some
glibc-centric software expects it to exist, so let's provide it.
| Rich Felker | 2013-07-19 | 1 | -0/+2 |
| * | fix FILENAME_MAX to match PATH_MAX•••POSIX is not clear on whether it includes the termination, but ISO C
requires that it does. the whole concept of this macro is rather
useless, but it's better to be correct anyway.
| Rich Felker | 2013-07-18 | 1 | -1/+1 |
| * | add NFDBITS in sys/select.h with appropriate feature tests•••the main use for this macro seems to be knowing the correct allocation
granularity for dynamic-sized fd_set objects. such usage is
non-conforming and results in undefined behavior, but it is widespread
in applications.
| Rich Felker | 2013-07-06 | 1 | -0/+3 |
| * | add legacy sys/ttydefaults.h header | rofl0r | 2013-07-03 | 1 | -0/+39 |
| * | add legacy scsi/scsi_ioctl.h header | rofl0r | 2013-07-03 | 1 | -0/+11 |
| * | paths.h: remove cruft•••a research in debian codesearch and grepping over the pkgsrc
directory tree have shown that these macros are all either unused,
or defined by programs in case they need them.
| rofl0r | 2013-07-03 | 1 | -9/+0 |
| * | add stubs for additional legacy ether.h functions•••these would not be expensive to actually implement, but reading
/etc/ethers does not sound like a particularly useful feature, so for
now I'm leaving them as stubs.
| Rich Felker | 2013-07-01 | 1 | -3/+3 |
| * | fix shifts possibly larger than type in major() macro•••in theory this should not be an issue, since major() should only be
applied to type dev_t, which is 64-bit. however, it appears some
applications are not using dev_t but a smaller integer type (which
works on Linux because the kernel's dev_t is really only 32-bit). to
avoid the undefined behavior, do it as two shifts.
| Rich Felker | 2013-06-29 | 1 | -1/+1 |
| * | implement minimal dlinfo function | Rich Felker | 2013-06-29 | 1 | -0/+3 |
| * | work around wrong kernel type for sem_nsems member of struct semid_ds•••rejecting invalid values for n is fine even in the case where a new
sem will not be created, since the kernel does its range checks on n
even in this case as well.
by default, the kernel will bound the limit well below USHRT_MAX
anyway, but it's presumably possible that an administrator could
override this limit and break things.
| Rich Felker | 2013-06-28 | 1 | -1/+9 |
| * | add missing type shmatt_t in sys/shm.h•••this type is not really intended to be used; it's just there to allow
implementations to choose the type for the shm_nattch member of
struct shmid_sh, presumably since historical implementations disagreed
on the type. in any case, it needs to be there, so now it is.
| Rich Felker | 2013-06-28 | 1 | -0/+2 |
| * | minor compatibility fixes in utmp.h and fixing mismatch with paths.h•••the pathnames prefixed with /dev/null/ are guaranteed never to be
valid. the previous use of /dev/null alone was mildly dangerous in
that bad software might attempt to unlink the name when it found a
non-regular file there and create a new file.
| Rich Felker | 2013-06-27 | 2 | -4/+10 |
| * | document in sysconf and unistd.h that per-thread cpu clocks exist | Rich Felker | 2013-06-26 | 1 | -0/+1 |
| * | respect iso c namespace in stdio.h and wchar.h regarding va_list•••despite declaring functions that take arguments of type va_list, these
headers are not permitted by the c standard to expose the definition
of va_list, so an alias for the type must be used. the name
__isoc_va_list was chosen to convey that the purpose of this alternate
name is for iso c conformance, and to avoid the multitude of names
which gcc mangles with its hideous "fixincludes" monstrosity, leading
to serious header breakage if these "fixes" are run.
| Rich Felker | 2013-06-25 | 2 | -17/+19 |
| * | implement inet_lnaof, inet_netof, and inet_makeaddr•••also move all legacy inet_* functions into a single file to avoid
wasting object file and compile time overhead on them.
the added functions are legacy interfaces for working with classful
ipv4 network addresses. they have no modern usefulness whatsoever, but
some programs unconditionally use them anyway, and they're tiny.
| Rich Felker | 2013-06-25 | 1 | -1/+4 |
| * | add ether_aton[_r] and ether_ntoa[_r] functions•••based on patch by Strake with minor stylistic changes, and combined
into a single file. this patch remained open for a long time due to
some question as to whether ether_aton would be better implemented in
terms of sscanf, and it's time something was committed, so here it is.
| Rich Felker | 2013-06-25 | 1 | -0/+14 |
| * | add clock id macros for a number of new(ish) Linux-specific clocks•••arguably CLOCK_MONOTONIC should be redirected to CLOCK_BOOTTIME with a
fallback for old kernels that don't support it, since Linux's
CLOCK_BOOTTIME semantics seem to match the spirit of the POSIX
requirements for CLOCK_MONOTONIC better than Linux's version of
CLOCK_MONOTONIC does. however, this is a change that would require
further discussion and research, so for now, I'm simply making them
all available.
| Rich Felker | 2013-06-08 | 1 | -0/+6 |
| * | fix the type of CLOCKS_PER_SEC to match new clock_t type•••originally it was right on 32-bit archs and wrong on 64-bit, but after
recent changes it was wrong everywhere. with this commit, it's now
right everywhere.
| Rich Felker | 2013-06-08 | 1 | -1/+1 |
| * | improve handling of nonstandard fields in struct tm•••defining tm_gmtoff and tm_zone as macros was breaking some application
code that used these names for its own purposes.
| Rich Felker | 2013-06-07 | 1 | -4/+5 |
| * | fix the prototype of settimeofday to follow the original BSD declaration | Szabolcs Nagy | 2013-05-26 | 1 | -5/+5 |
| * | add FLT_TRUE_MIN, etc. macros from C11•••there was some question as to how many decimal places to use, since
one decimal place is always sufficient to identify the smallest
denormal uniquely. for now, I'm following the example in the C
standard which is consistent with the other min/max macros we already
had in place.
| Rich Felker | 2013-05-17 | 1 | -0/+2 |
| * | remove the __STDC_FORMAT_MACROS nonsense from inttypes.h•••somehow I missed this when removing the corresponding
__STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS nonsense from stdint.h.
these were all attempts by the C committee to guess what the C++
committee would want, and the guesses turned out to be wrong.
| Rich Felker | 2013-05-17 | 1 | -4/+0 |
| * | support full range of dev_t major/minor numbers in makedev, etc. macros | Rich Felker | 2013-05-15 | 1 | -3/+10 |
| * | remove compound literals from math.h to please c++•••__FLOAT_BITS and __DOUBLE_BITS macros used union compound literals,
now they are changed into static inline functions. A good C compiler
generates the same code for both and the later is C++ conformant.
| Szabolcs Nagy | 2013-05-06 | 1 | -5/+10 |