- 14 6月, 2012 3 次提交
-
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
stime is not _XOPEN_SOURCE, and some functions were missing with _BSD_SOURCE..
-
由 Rich Felker 提交于
-
- 13 6月, 2012 1 次提交
-
-
由 Rich Felker 提交于
based on patch by Emil Renner Berthing, with minor changes to dirent.h for LFS64 and organization of declarations this code should work unmodified once a real strverscmp is added, but I've been hesitant to add it because the GNU strverscmp behavior is harmful in a lot of cases (for instance if you have numeric filenames in hex). at some point I plan on trying to design a variant of the algorithm that behaves better on a mix of filename styles.
-
- 08 6月, 2012 3 次提交
-
-
由 Rich Felker 提交于
the types of these expressions must match the integer promotions. unsigned 8- and 16-bit values promote to signed int, not unsigned int.
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
this broke the busybox "free" utility (memory reporting) and possibly other things like uptime.
-
- 04 6月, 2012 1 次提交
-
-
由 Rich Felker 提交于
this is ugly and stupid, but now that the *64 symbol names exist, a lot of broken GNU software detects them in configure, then either breaks during build due to missing off64_t definition, or attempts to compile without function declarations/prototypes. "fixing" it here is easier than telling everyone to add yet another feature test macro to their builds.
-
- 03 6月, 2012 1 次提交
-
-
由 Rich Felker 提交于
lots of broken programs expect this, and it's gotten to the point of being a troubleshooting FAQ topic. best to just fix it.
-
- 29 5月, 2012 4 次提交
-
-
由 Rich Felker 提交于
no idea where I got the idea fpurge should exist...
-
由 Rich Felker 提交于
also fix up distinction of what is GNU-only and what's GNU+BSD
-
由 Rich Felker 提交于
-
由 nsz 提交于
-
- 23 5月, 2012 7 次提交
-
-
由 Rich Felker 提交于
i originally made it the same size as the bloated GNU version, which contains space for saved signal mask, but this makes some structures containing jmp_buf become much larger for no benefit. we will never use the signal mask field with plain setjmp; sigsetjmp serves that purpose.
-
由 Rich Felker 提交于
i made a best attempt, but the intended semantics of this function are fundamentally contradictory. there is no consistent way to handle ownership of locks when forking a multi-threaded process. the code could have worked by accident for programs that only used normal mutexes and nothing else (since they don't actually store or care about their owner), but that's about it. broken-by-design interfaces that aren't even in glibc (only solaris) don't belong in musl.
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
there is no reason to avoid multiple identical macro definitions; this is perfectly legal C, and even with the maximal warning options enabled, gcc does not issue any warning for it.
-
由 Rich Felker 提交于
its only purpose was for use on non-BSD systems that implement sysv semantics for signal() by default.
-
由 Rich Felker 提交于
patch by Isaac Dunham. matched closely (maybe not exact) to glibc's idea of what _BSD_SOURCE should make visible.
-
- 21 5月, 2012 1 次提交
-
-
由 Rich Felker 提交于
-
- 14 5月, 2012 2 次提交
-
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
- 13 5月, 2012 6 次提交
-
-
由 Rich Felker 提交于
we do not bother making h_errno thread-local since the only interfaces that use it are inherently non-thread-safe. but still use the potentially-thread-local ABI to access it just to avoid lock-in.
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 nsz 提交于
-
- 11 5月, 2012 4 次提交
-
-
由 Rich Felker 提交于
written to avoid multiple conditional jumps and avoid ugly repetitive lines in the header file.
-
由 Rich Felker 提交于
this one is for program(s|ers) who haven't heard of uint16_t and uint32_t (which are obviously the correct types for use in such situations, as they're the argument/return types for ntohs/htons and ntohl/htonl).
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
- 10 5月, 2012 2 次提交
-
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
this is all junk, but some programs use it.
-
- 09 5月, 2012 1 次提交
-
-
由 Rich Felker 提交于
the non-prototype declaration of basename in string.h is an ugly compromise to avoid breaking 2 types of broken software: 1. programs which assume basename is declared in string.h and thus would suffer from dangerous pointer-truncation if an implicit declaration were used. 2. programs which include string.h with _GNU_SOURCE defined but then declare their own prototype for basename using the incorrect GNU signature for the function (which would clash with a correct prototype). however, since C++ does not have non-prototype declarations and interprets them as prototypes for a function with no arguments, we must omit it when compiling C++ code. thankfully, all known broken apps that suffer from the above issues are written in C, not C++.
-
- 07 5月, 2012 2 次提交
-
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
this only works with gcc 4.6 and later, but it allows us to support non-default endianness on archs like arm, mips, ppc, etc. that can do both without having separate header sets for both variants, and it saves one #include even on fixed-endianness archs like x86.
-
- 06 5月, 2012 2 次提交
-
-
由 Rich Felker 提交于
apparently some packages see stropts.h and want to be able to use this. the implementation checks that the file descriptor is valid by using fcntl/F_GETFD so it can report an error if not (as specified).
-
由 Rich Felker 提交于
two issues: (1) the type was wrong (unsigned instead of signed int), and (2) the value of FP_ILOGBNAN should be INT_MIN rather than INT_MAX to match the ABI. this is also much more useful since INT_MAX corresponds to a valid input (infinity). the standard would allow us to set FP_ILOGB0 to -INT_MAX instead of INT_MIN, which would give us distinct values for ilogb(0) and ilogb(NAN), but the benefit seems way too small to justify ignoring the ABI. note that the macro is just a "portable" (to any twos complement system where signed and unsigned int have the same width) way to write INT_MIN without needing limits.h. it's valid to use this method since these macros are not required to work in #if directives.
-