mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-02 17:28:30 +00:00
Remove getopt_long() from headers
We removed this API a long time ago and it was breaking the GNU make open source build.
This commit is contained in:
parent
b881c0ec9e
commit
12452976bd
8 changed files with 12 additions and 23 deletions
|
@ -20,6 +20,7 @@
|
|||
#include "libc/calls/syscall-nt.internal.h"
|
||||
#include "libc/calls/syscall-sysv.internal.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/intrin/strace.internal.h"
|
||||
|
||||
/**
|
||||
* Sets current directory based on file descriptor.
|
||||
|
@ -30,9 +31,12 @@
|
|||
* @asyncsignalsafe
|
||||
*/
|
||||
int fchdir(int dirfd) {
|
||||
int rc;
|
||||
if (!IsWindows()) {
|
||||
return sys_fchdir(dirfd);
|
||||
rc = sys_fchdir(dirfd);
|
||||
} else {
|
||||
return sys_fchdir_nt(dirfd);
|
||||
rc = sys_fchdir_nt(dirfd);
|
||||
}
|
||||
STRACE("fchdir(%d) → %d% m", dirfd, rc);
|
||||
return rc;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_CALLS_GROUPS_INTERNAL_H_
|
||||
#define COSMOPOLITAN_LIBC_CALLS_GROUPS_INTERNAL_H_
|
||||
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/syscall-sysv.internal.h"
|
||||
#include "libc/calls/termios.h"
|
||||
#include "libc/dce.h"
|
||||
|
@ -41,6 +42,8 @@ int tcgetpgrp(int fd) {
|
|||
rc = sys_ioctl(fd, TIOCGPGRP_linux, &pgrp);
|
||||
} else if (IsBsd()) {
|
||||
rc = sys_ioctl(fd, TIOCGPGRP_bsd, &pgrp);
|
||||
} else if (IsWindows()) {
|
||||
rc = getpid();
|
||||
} else {
|
||||
rc = enosys();
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ char *strpbrk(const char *s, const char *accept) {
|
|||
if (!accept[1]) {
|
||||
return strchr(s, accept[0]);
|
||||
} else {
|
||||
memset(lut, 0, sizeof(lut));
|
||||
bzero(lut, sizeof(lut));
|
||||
while (*accept) {
|
||||
lut[*accept++ & 255] = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue