Mercurial > hg > toybox
comparison lib/portability.h @ 1664:692be264d4f0 draft
fix non-glibc basename(3) usage
I considered a #else on the big #ifdef __GLIBC__ above, but that
seemed harder to follow.
author | Elliott Hughes <enh@google.com> |
---|---|
date | Sun, 18 Jan 2015 13:36:31 -0600 |
parents | 988f3d13b925 |
children | 5d003cc2fa16 |
comparison
equal
deleted
inserted
replaced
1663:988f3d13b925 | 1664:692be264d4f0 |
---|---|
139 #endif | 139 #endif |
140 #endif | 140 #endif |
141 | 141 |
142 #endif | 142 #endif |
143 | 143 |
144 #ifndef __GLIBC__ | |
145 // POSIX basename. | |
146 #include <libgen.h> | |
147 #endif | |
148 | |
144 #ifdef __MUSL__ | 149 #ifdef __MUSL__ |
145 #include <unistd.h> | 150 #include <unistd.h> |
146 // Without this "rm -r dir" fails with "is directory". | 151 // Without this "rm -r dir" fails with "is directory". |
147 #define faccessat(A, B, C, D) faccessat(A, B, C, 0) | 152 #define faccessat(A, B, C, D) faccessat(A, B, C, 0) |
148 #endif | 153 #endif |