about summary refs log tree commit diff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* support full range of dev_t major/minor numbers in makedev, etc. macrosRich Felker2013-05-151-3/+10
|
* remove compound literals from math.h to please c++Szabolcs Nagy2013-05-061-5/+10
| | | | | | __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.
* remove __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS checks in stdint.hRich Felker2013-04-221-8/+0
| | | | | | | C++11, the first C++ with stdint.h, requires the previously protected macros to be exposed unconditionally by stdint.h. apparently these checks were an early attempt by the C committee to guess what the C++ committee would want, and they guessed wrong.
* make ifaddrs.h expose sys/socket.hRich Felker2013-04-101-0/+1
| | | | | | the getifaddrs interface seems to have been invented by glibc, and they expose socket.h, so for us not to do so is just gratuitous incompatibility with the interface we're mimicing.
* add support for program_invocation[_short]_nameRich Felker2013-04-061-0/+6
| | | | | | | | | | this is a bit ugly, and the motivation for supporting it is questionable. however the main factors were: 1. it will be useful to have this for certain internal purposes anyway -- things like syslog. 2. applications can just save argv[0] in main, but it's hard to fix non-portable library code that's depending on being able to get the invocation name without the main application's help.
* include/ifaddrs.h: add prototypes for get/freeifaddrsrofl0r2013-04-051-0/+3
|
* add getifaddrsrofl0r2013-04-051-0/+31
| | | | | | supports ipv4 and ipv6, but not the "extended" usage where usage statistics and other info are assigned to ifa_data members of duplicate entries with AF_PACKET family.
* net/if.h: add some missing IFF_ constantsrofl0r2013-04-051-0/+5
|
* add prototype for dn_skipnameRich Felker2013-04-041-0/+1
|
* add arpa/tftp.hrofl0r2013-04-051-0/+31
|
* fix type issues in stdint.h so underlying types of 64-bit types match ABIRich Felker2013-04-041-8/+15
|
* eliminate bits/wchar.hRich Felker2013-04-042-2/+15
| | | | | | | the preprocessor can reliably determine the signedness of wchar_t. L'\0' is used for 0 in the expressions so that, if the underlying type of wchar_t is long rather than int, the promoted type of the expression will match the type of wchar_t.
* eliminate gcc dependency for testing char signedness in limits.hRich Felker2013-04-041-1/+1
|
* add put*ent functions for passwd/group files and similar for shadowRich Felker2013-04-042-0/+2
| | | | | | | | | since shadow does not yet support enumeration (getspent), the corresponding FILE-based get and put versions are also subbed out for now. this is partly out of laziness and partly because it's not clear how they should work in the presence of TCB shadow files. the stubs should make it possible to compile some software that expects them to exist, but such software still may not work properly.
* re-add useconds_trofl0r2013-04-022-0/+2
| | | | | | | | this type was removed back in 5243e5f1606a9c6fcf01414e , because it was removed from the XSI specs. however some apps use it. since it's in the POSIX reserved namespace, we can expose it unconditionally.
* add arpa/nameser_compat.hrofl0r2013-04-021-0/+2
| | | | the contents of this header are already in arpa/nameser.h
* make tm_zone etc visible under _GNU_SOURCErofl0r2013-04-021-1/+1
|
* add new socket options to sys/socket.h following linuxSzabolcs Nagy2013-04-011-2/+17
|
* adding ethernet protocol ids to if_ether.h following linuxSzabolcs Nagy2013-04-011-0/+15
|
* add ADJ_SETOFFSET timex mode bit (new in linux v2.6.39)Szabolcs Nagy2013-04-011-0/+1
|
* add new linux tcp socket option flags to netinet/tcp.hSzabolcs Nagy2013-04-011-0/+10
|
* provide prototype for pthread_getattr_npRich Felker2013-03-311-0/+4
|
* fix epoll structure alignment on non-x86_64 archsRich Felker2013-03-061-1/+5
| | | | | | | | | | | | | | this fix is far from ideal and breaks the rule of not using arch-specific #ifdefs, but for now we just need a solution to the existing breakage. the underlying problem is that the kernel folks made a very stupid decision to make misalignment of this struct part of the kernel API/ABI for x86_64, in order to avoid writing a few extra lines of code to handle both 32- and 64-bit userspace on 64-bit kernels. I had just added the packed attribute unconditionally thinking it was harmless on 32-bit archs, but non-x86 32-bit archs have 8-byte alignment on 64-bit types.
* fix missing type error in grp.h from adding fgetgrentRich Felker2013-03-061-0/+4
|
* fix some obscure header type size/alignment issuesRich Felker2013-03-044-10/+9
|
* fix cruft in utmp.h that was broken by changes in utmpx.hRich Felker2013-02-261-3/+0
| | | | patch by Chris Spiegel.
* namespace conformance to latest standards in strings.hRich Felker2013-02-261-4/+6
|
* scsci/sg.h: fix usage of undefined macro HZrofl0r2013-02-211-1/+1
| | | | | this macro is 100 on all archs, at least in userspace, according to kernel headers.