about summary refs log tree commit diff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* add some new linux AT_* flagsRich Felker2013-08-031-0/+2
|
* add prototypes for euidaccess/eaccessRich Felker2013-08-031-0/+2
|
* fix feature test macro logic for _BSD_SOURCERich Felker2013-08-023-7/+7
| | | | | | in several places, _BSD_SOURCE was not even implying POSIX, resulting in it being subtractive rather than additive (compared to the default features).
* add missing c++ extern "C" wrapping to link.hRich Felker2013-08-021-0/+8
|
* provide useless 64-bit fcntl macros with _LARGEFILE64_SOURCERich Felker2013-08-021-0/+3
| | | | | this is all useless but part of the API, which is part of the _GNU_SOURCE API, so something may need them.
* add macros for new(ish) prctl commandsRich Felker2013-07-301-0/+37
|
* fix some prctl macros that were incorrectly copied into this fileRich Felker2013-07-301-3/+3
|
* add wrapper headers, with warnings, for various incorrect names under sysRich Felker2013-07-276-0/+11
| | | | | | | 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.
* a few more fixes for unistd/sysconf feature reportingRich Felker2013-07-271-0/+1
|
* report presence of ADV and MSG options in unistd.h and sysconfRich Felker2013-07-261-0/+2
|
* report that posix_spawn is supported in unistd.h and sysconfRich Felker2013-07-261-0/+1
|
* fix incorrect type for new si_call_addr in siginfo_tRich Felker2013-07-241-3/+3
| | | | | | | | | | 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.
* add protocol families PF_IB and PF_VSOCK to socket.hSzabolcs Nagy2013-07-251-1/+5
| | | | | | | | linux commit 8d36eb01da5d371feffa280e501377b5c450f5a5 (2013-05-29) added PF_IB for InfiniBand linux commit d021c344051af91f42c5ba9fdedc176740cbd238 (2013-02-06) added PF_VSOCK for VMware sockets
* update siginfo according to linux headersSzabolcs Nagy2013-07-241-1/+13
| | | | | | | | 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)
* add PTRACE_PEEKSIGINFO to ptrace.hSzabolcs Nagy2013-07-241-0/+11
| | | | | added in linux-v3.10 commit 84c751bd4aebbaae995fe32279d3dba48327bad4 using stdint.h types for the new ptrace_peeksiginfo_args struct
* add if_ether.h constants ETH_P_802_3_MIN and ETH_P_BATMANSzabolcs Nagy2013-07-241-0/+3
| | | | | see linux commits 4f99ad51292078cc47343c17d3870764588cff73 and e5c5d22e8dcf7c2d430336cbf8e180bd38e8daf1
* add CLOCK_TAI (and CLOCK_SGI_CYCLE) clock ids to time.hSzabolcs Nagy2013-07-241-0/+2
| | | | added in linux-v3.10 commit 1ff3c9677bff7e468e0c487d0ffefe4e901d33f4
* remove TCP_COOKIE_TRANSACTIONS from tcp.hSzabolcs Nagy2013-07-241-1/+0
| | | | removed in linux-v3.10 in commit 1a2c6181c4a1922021b4d7df373bba612c3e5f04
* add SO_SELECT_ERR_QUEUE to socket.hSzabolcs Nagy2013-07-241-0/+1
| | | | introduced in linux-v3.10 commit 7d4c04fc170087119727119074e72445f2bb192b
* change jmp_buf to share an underlying type and struct tag with sigjmp_bufRich Felker2013-07-241-7/+6
| | | | | | | | | | 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.
* undefine internal-use type macros at the end of alltypes.hRich Felker2013-07-221-0/+4
| | | | | | | | | | | | | | | | | 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.
* move register_t and u_int64_t (back) to alltypesRich Felker2013-07-222-2/+7
| | | | | | | | 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.
* fix regression in size of nlink_t (broken stat struct) on x86_64Rich Felker2013-07-221-1/+1
| | | | | | | | 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.
* make regoff_t and regex_t match C++ ABIRich Felker2013-07-222-3/+3
| | | | | | 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.
* make pthread_key_t unsigned to match ABIRich Felker2013-07-221-1/+1
|
* make pthread attribute types structs, even when they just have one fieldRich Felker2013-07-221-3/+3
| | | | | this change is to get the right tags for C++ ABI matching. it should have no other effects.
* change wint_t to unsignedRich Felker2013-07-223-4/+4
| | | | | | | | | | | | 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.
* refactor headers, especially alltypes.h, and improve C++ ABI compatRich Felker2013-07-2218-87/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* add UIO_MAXIOV macro in sys/uio.hRich Felker2013-07-191-0/+2
| | | | | | 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.
* fix FILENAME_MAX to match PATH_MAXRich Felker2013-07-181-1/+1
| | | | | | 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.
* add NFDBITS in sys/select.h with appropriate feature testsRich Felker2013-07-061-0/+3
| | | | | | | 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.
* add legacy sys/ttydefaults.h headerrofl0r2013-07-031-0/+39
|
* add legacy scsi/scsi_ioctl.h headerrofl0r2013-07-031-0/+11
|
* paths.h: remove cruftrofl0r2013-07-031-9/+0
| | | | | | 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.
* add stubs for additional legacy ether.h functionsRich Felker2013-07-011-3/+3
| | | | | | 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.
* fix shifts possibly larger than type in major() macroRich Felker2013-06-291-1/+1
| | | | | | | | 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.
* implement minimal dlinfo functionRich Felker2013-06-291-0/+3
|
* work around wrong kernel type for sem_nsems member of struct semid_dsRich Felker2013-06-281-1/+9
| | | | | | | | | | 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.
* add missing type shmatt_t in sys/shm.hRich Felker2013-06-281-0/+2
| | | | | | | 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.
* minor compatibility fixes in utmp.h and fixing mismatch with paths.hRich Felker2013-06-272-4/+10
| | | | | | | 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.
* document in sysconf and unistd.h that per-thread cpu clocks existRich Felker2013-06-261-0/+1
|
* respect iso c namespace in stdio.h and wchar.h regarding va_listRich Felker2013-06-252-17/+19
| | | | | | | | | | 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.
* implement inet_lnaof, inet_netof, and inet_makeaddrRich Felker2013-06-251-1/+4
| | | | | | | | | 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.
* add ether_aton[_r] and ether_ntoa[_r] functionsRich Felker2013-06-251-0/+14
| | | | | | | 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.
* add clock id macros for a number of new(ish) Linux-specific clocksRich Felker2013-06-081-0/+6
| | | | | | | | | | 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.
* fix the type of CLOCKS_PER_SEC to match new clock_t typeRich Felker2013-06-081-1/+1
| | | | | | 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.
* improve handling of nonstandard fields in struct tmRich Felker2013-06-071-4/+5
| | | | | defining tm_gmtoff and tm_zone as macros was breaking some application code that used these names for its own purposes.
* fix the prototype of settimeofday to follow the original BSD declarationSzabolcs Nagy2013-05-261-5/+5
|
* add FLT_TRUE_MIN, etc. macros from C11Rich Felker2013-05-171-0/+2
| | | | | | | | 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.
* remove the __STDC_FORMAT_MACROS nonsense from inttypes.hRich Felker2013-05-171-4/+0
| | | | | | | 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.