Replace COSMO define with _COSMO_SOURCE

This change might cause ABI breakages for /opt/cosmos. It's needed to
help us better conform to header declaration practices.
This commit is contained in:
Justine Tunney 2023-08-13 20:31:27 -07:00
parent a033b65a33
commit c776a32f75
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
238 changed files with 858 additions and 1069 deletions

View file

@ -1,2 +0,0 @@
#include "libc/sysv/macros.internal.h"
.scall ioprio_get,0xfffffffffffff0fc,31,4095,globl

View file

@ -1,2 +0,0 @@
#include "libc/sysv/macros.internal.h"
.scall ioprio_set,0xfffffffffffff0fb,30,4095,globl

View file

@ -0,0 +1,2 @@
#include "libc/sysv/macros.internal.h"
.scall sys_ioprio_get,0xfffffffffffff0fc,31,4095,globl

View file

@ -0,0 +1,2 @@
#include "libc/sysv/macros.internal.h"
.scall sys_ioprio_set,0xfffffffffffff0fb,30,4095,globl

View file

@ -1,6 +1,6 @@
#ifndef COSMOPOLITAN_LIBC_SYSV_CONSTS_CLONE_H_
#define COSMOPOLITAN_LIBC_SYSV_CONSTS_CLONE_H_
#ifdef COSMO
#ifdef _COSMO_SOURCE
#define CSIGNAL 0x000000ff
#define CLONE_VM 0x00000100
@ -28,5 +28,5 @@
#define CLONE_NEWNET 0x40000000
#define CLONE_IO 0x80000000
#endif /* COSMO */
#endif /* _COSMO_SOURCE */
#endif /* COSMOPOLITAN_LIBC_SYSV_CONSTS_CLONE_H_ */

View file

@ -1,6 +1,6 @@
#ifndef COSMOPOLITAN_LIBC_SYSV_CONSTS_FUTEX_H_
#define COSMOPOLITAN_LIBC_SYSV_CONSTS_FUTEX_H_
#ifdef COSMO
#ifdef _COSMO_SOURCE
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
@ -23,5 +23,5 @@ extern const int FUTEX_REQUEUE;
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMO */
#endif /* _COSMO_SOURCE */
#endif /* COSMOPOLITAN_LIBC_SYSV_CONSTS_FUTEX_H_ */

View file

@ -1,5 +1,6 @@
#ifndef COSMOPOLITAN_LIBC_SYSV_CONSTS_IOPRIO_H_
#define COSMOPOLITAN_LIBC_SYSV_CONSTS_IOPRIO_H_
#ifdef _COSMO_SOURCE
#define IOPRIO_WHO_PROCESS 1
#define IOPRIO_WHO_PGRP 2
@ -27,4 +28,5 @@
#define IOPRIO_NORM 4
#define IOPRIO_BE_NORM IOPRIO_NORM
#endif /* _COSMO_SOURCE */
#endif /* COSMOPOLITAN_LIBC_SYSV_CONSTS_IOPRIO_H_ */

View file

@ -1,6 +1,6 @@
#ifndef COSMOPOLITAN_LIBC_SYSV_CONSTS_NR_H_
#define COSMOPOLITAN_LIBC_SYSV_CONSTS_NR_H_
#ifdef COSMO
#ifdef _COSMO_SOURCE
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
@ -339,5 +339,5 @@ extern const int __NR_ktrace;
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMO */
#endif /* _COSMO_SOURCE */
#endif /* COSMOPOLITAN_LIBC_SYSV_CONSTS_NR_H_ */

View file

@ -1,6 +1,6 @@
#ifndef COSMOPOLITAN_LIBC_SYSV_CONSTS_NRLINUX_H_
#define COSMOPOLITAN_LIBC_SYSV_CONSTS_NRLINUX_H_
#ifdef COSMO
#ifdef _COSMO_SOURCE
#ifdef __x86_64__
@ -657,5 +657,5 @@
#endif /* __x86_64__ */
#endif /* COSMO */
#endif /* _COSMO_SOURCE */
#endif /* COSMOPOLITAN_LIBC_SYSV_CONSTS_NRLINUX_H_ */

View file

@ -267,8 +267,8 @@ scall sys_waitid 0xfffffffff28ad8f7 0x05f globl # Linux 2.6.9+; no wrapper
scall sys_add_key 0xfffffffffffff0f8 0x0d9 globl # no wrapper
scall sys_request_key 0xfffffffffffff0f9 0x0da globl # no wrapper
scall sys_keyctl 0xfffffffffffff0fa 0x0db globl # no wrapper
scall ioprio_set 0xfffffffffffff0fb 0x01e globl
scall ioprio_get 0xfffffffffffff0fc 0x01f globl
scall sys_ioprio_set 0xfffffffffffff0fb 0x01e globl
scall sys_ioprio_get 0xfffffffffffff0fc 0x01f globl
scall sys_inotify_init 0xfffffffffffff0fd 0xfff globl # no wrapper
scall sys_inotify_add_watch 0xfffffffffffff0fe 0xfff globl # no wrapper
scall sys_inotify_rm_watch 0xfffffffffffff0ff 0xfff globl # no wrapper