From 120079b0a6d891bbe49a2abd21e03d5e2d8e233d Mon Sep 17 00:00:00 2001 From: Justine Tunney Date: Sat, 17 Dec 2022 00:39:52 -0800 Subject: [PATCH] Remove evil constants from cosmopolitan.h - `I` a.k.a. `_Complex_I` (fixes #705) - `B0`, `B50`, etc. (fixes #403) --- libc/calls/ttydefaults.h | 2 +- libc/{imag.h => imag.internal.h} | 0 libc/isystem/complex.h | 2 +- libc/isystem/termios.h | 2 +- libc/isystem/tgmath.h | 2 +- libc/sysv/consts/{baud.h => baud.internal.h} | 0 third_party/python/Modules/termios.c | 2 +- third_party/zip/ttyio.c | 2 +- 8 files changed, 6 insertions(+), 6 deletions(-) rename libc/{imag.h => imag.internal.h} (100%) rename libc/sysv/consts/{baud.h => baud.internal.h} (100%) diff --git a/libc/calls/ttydefaults.h b/libc/calls/ttydefaults.h index e17a31c34..c2335171c 100644 --- a/libc/calls/ttydefaults.h +++ b/libc/calls/ttydefaults.h @@ -1,6 +1,6 @@ #ifndef COSMOPOLITAN_LIBC_CALLS_TTYDEFAULTS_H_ #define COSMOPOLITAN_LIBC_CALLS_TTYDEFAULTS_H_ -#include "libc/sysv/consts/baud.h" +#include "libc/sysv/consts/baud.internal.h" #include "libc/sysv/consts/termios.h" #define TTYDEF_IFLAG (BRKINT | ISTRIP | ICRNL | IMAXBEL | IXON | IXANY) diff --git a/libc/imag.h b/libc/imag.internal.h similarity index 100% rename from libc/imag.h rename to libc/imag.internal.h diff --git a/libc/isystem/complex.h b/libc/isystem/complex.h index 44c91f1b6..e42e8e4a2 100644 --- a/libc/isystem/complex.h +++ b/libc/isystem/complex.h @@ -1,6 +1,6 @@ #ifndef LIBC_ISYSTEM_COMPLEX_H_ #define LIBC_ISYSTEM_COMPLEX_H_ #include "libc/complex.h" -#include "libc/imag.h" +#include "libc/imag.internal.h" #include "libc/math.h" #endif diff --git a/libc/isystem/termios.h b/libc/isystem/termios.h index 2ea2aacf5..ef988e466 100644 --- a/libc/isystem/termios.h +++ b/libc/isystem/termios.h @@ -2,6 +2,6 @@ #define COSMOPOLITAN_LIBC_ISYSTEM_TERMIOS_H_ #include "libc/calls/termios.h" #include "libc/calls/weirdtypes.h" -#include "libc/sysv/consts/baud.h" +#include "libc/sysv/consts/baud.internal.h" #include "libc/sysv/consts/termios.h" #endif /* COSMOPOLITAN_LIBC_ISYSTEM_TERMIOS_H_ */ diff --git a/libc/isystem/tgmath.h b/libc/isystem/tgmath.h index ed6bd063d..39785a918 100644 --- a/libc/isystem/tgmath.h +++ b/libc/isystem/tgmath.h @@ -1,7 +1,7 @@ #ifndef LIBC_ISYSTEM_TGMATH_H_ #define LIBC_ISYSTEM_TGMATH_H_ #include "libc/complex.h" -#include "libc/imag.h" +#include "libc/imag.internal.h" #include "libc/math.h" #if !(__ASSEMBLER__ + __LINKER__ + 0) #if __STDC_VERSION__ + 0 >= 201112 diff --git a/libc/sysv/consts/baud.h b/libc/sysv/consts/baud.internal.h similarity index 100% rename from libc/sysv/consts/baud.h rename to libc/sysv/consts/baud.internal.h diff --git a/third_party/python/Modules/termios.c b/third_party/python/Modules/termios.c index 31a9a09ba..9d2292de7 100644 --- a/third_party/python/Modules/termios.c +++ b/third_party/python/Modules/termios.c @@ -9,7 +9,7 @@ #include "libc/calls/ttydefaults.h" #include "libc/calls/weirdtypes.h" #include "libc/dce.h" -#include "libc/sysv/consts/baud.h" +#include "libc/sysv/consts/baud.internal.h" #include "libc/sysv/consts/fio.h" #include "libc/sysv/consts/modem.h" #include "libc/sysv/consts/pty.h" diff --git a/third_party/zip/ttyio.c b/third_party/zip/ttyio.c index 9e8c2c5b3..d2a7263dc 100644 --- a/third_party/zip/ttyio.c +++ b/third_party/zip/ttyio.c @@ -134,7 +134,7 @@ # ifdef HAVE_TERMIOS_H #include "libc/calls/termios.h" #include "libc/calls/weirdtypes.h" -#include "libc/sysv/consts/baud.h" +#include "libc/sysv/consts/baud.internal.h" #include "libc/sysv/consts/termios.h" # define sgttyb termios # define sg_flags c_lflag