diff --git a/libc/dce.h b/libc/dce.h index 5b9f7e0fb..f67cb0028 100644 --- a/libc/dce.h +++ b/libc/dce.h @@ -1,6 +1,6 @@ +#ifdef _COSMO_SOURCE #ifndef COSMOPOLITAN_LIBC_DCE_H_ #define COSMOPOLITAN_LIBC_DCE_H_ -#ifdef _COSMO_SOURCE /*─────────────────────────────────────────────────────────────────────────────╗ │ cosmopolitan § autotune » dead code elimination │ ╚─────────────────────────────────────────────────────────────────────────────*/ @@ -125,5 +125,5 @@ int IsQemuUser(void); COSMOPOLITAN_C_END_ #endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */ -#endif /* _COSMO_SOURCE */ #endif /* COSMOPOLITAN_LIBC_DCE_H_ */ +#endif /* _COSMO_SOURCE */ diff --git a/libc/dlopen/dlfcn.h b/libc/dlopen/dlfcn.h index 57eecd2f8..0d879dc3e 100644 --- a/libc/dlopen/dlfcn.h +++ b/libc/dlopen/dlfcn.h @@ -16,13 +16,11 @@ void *dlopen(const char *, int) libcesque; void *dlsym(void *, const char *) libcesque; int dlclose(void *) libcesque; -#ifdef _COSMO_SOURCE char *cosmo_dlerror(void) libcesque; void *cosmo_dlopen(const char *, int) libcesque; void *cosmo_dlsym(void *, const char *) libcesque; void *cosmo_dltramp(void *) libcesque; int cosmo_dlclose(void *) libcesque; -#endif COSMOPOLITAN_C_END_ #endif /* COSMOPOLITAN_LIBC_DLFCN_H_ */ diff --git a/libc/fmt/itoa.h b/libc/fmt/itoa.h index 0ed808f07..258c90e0b 100644 --- a/libc/fmt/itoa.h +++ b/libc/fmt/itoa.h @@ -1,6 +1,6 @@ +#ifdef _COSMO_SOURCE #ifndef COSMOPOLITAN_LIBC_FMT_ITOA_H_ #define COSMOPOLITAN_LIBC_FMT_ITOA_H_ -#ifdef _COSMO_SOURCE COSMOPOLITAN_C_START_ #define LengthInt64 __LengthInt64 @@ -42,5 +42,5 @@ libcesque size_t uint64toarray_fixed16(uint64_t, char[hasatleast 17], uint8_t); libcesque size_t uint64toarray_radix8(uint64_t, char[hasatleast 24]); COSMOPOLITAN_C_END_ -#endif /* _COSMO_SOURCE */ #endif /* COSMOPOLITAN_LIBC_FMT_ITOA_H_ */ +#endif /* _COSMO_SOURCE */ diff --git a/libc/fmt/leb128.h b/libc/fmt/leb128.h index 8da59b5d3..beef341f9 100644 --- a/libc/fmt/leb128.h +++ b/libc/fmt/leb128.h @@ -1,6 +1,6 @@ +#ifdef _COSMO_SOURCE #ifndef COSMOPOLITAN_LIBC_FMT_LEB128_H_ #define COSMOPOLITAN_LIBC_FMT_LEB128_H_ -#ifdef _COSMO_SOURCE COSMOPOLITAN_C_START_ #define sleb64 __sleb64 @@ -16,5 +16,5 @@ int unzleb64(const char *, size_t, int64_t *) libcesque; int unuleb64(const char *, size_t, uint64_t *) libcesque; COSMOPOLITAN_C_END_ -#endif /* _COSMO_SOURCE */ #endif /* COSMOPOLITAN_LIBC_FMT_LEB128_H_ */ +#endif /* _COSMO_SOURCE */ diff --git a/libc/intrin/dll.h b/libc/intrin/dll.h index eb1ce8b74..65b701471 100644 --- a/libc/intrin/dll.h +++ b/libc/intrin/dll.h @@ -1,6 +1,6 @@ +#ifdef _COSMO_SOURCE #ifndef COSMOPOLITAN_LIBC_INTRIN_DLL_H_ #define COSMOPOLITAN_LIBC_INTRIN_DLL_H_ -#ifdef _COSMO_SOURCE #define dll_make_first __dll_make_first #define dll_make_last __dll_make_last #define dll_remove __dll_remove @@ -55,5 +55,5 @@ void dll_make_first(struct Dll **, struct Dll *) paramsnonnull((1)) libcesque; void dll_splice_after(struct Dll *, struct Dll *) paramsnonnull((1)) libcesque; COSMOPOLITAN_C_END_ -#endif /* _COSMO_SOURCE */ #endif /* COSMOPOLITAN_LIBC_INTRIN_DLL_H_ */ +#endif /* _COSMO_SOURCE */ diff --git a/libc/intrin/kprintf.h b/libc/intrin/kprintf.h index d11508a68..ea654acb2 100644 --- a/libc/intrin/kprintf.h +++ b/libc/intrin/kprintf.h @@ -1,6 +1,6 @@ +#ifdef _COSMO_SOURCE #ifndef COSMOPOLITAN_LIBC_INTRIN_KPRINTF_H_ #define COSMOPOLITAN_LIBC_INTRIN_KPRINTF_H_ -#ifdef _COSMO_SOURCE #define klog __klog #define kprintf __kprintf @@ -54,5 +54,5 @@ void uvprintf(const char *, va_list) libcesque; COSMOPOLITAN_C_END_ #endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */ -#endif /* _COSMO_SOURCE */ #endif /* COSMOPOLITAN_LIBC_INTRIN_KPRINTF_H_ */ +#endif /* _COSMO_SOURCE */ diff --git a/libc/log/log.h b/libc/log/log.h index dbe66134f..8e88377e2 100644 --- a/libc/log/log.h +++ b/libc/log/log.h @@ -1,7 +1,7 @@ +#ifdef _COSMO_SOURCE #ifndef COSMOPOLITAN_LIBC_LOG_LOG_H_ #define COSMOPOLITAN_LIBC_LOG_LOG_H_ #include "libc/stdio/stdio.h" -#ifdef _COSMO_SOURCE #define kLogFatal 0 #define kLogError 1 @@ -224,5 +224,5 @@ void vffatalf(ARGS, va_list) asm("vflogf") ATTRV relegated wontreturn libcesque; #endif /* __STRICT_ANSI__ */ COSMOPOLITAN_C_END_ -#endif /* _COSMO_SOURCE */ #endif /* COSMOPOLITAN_LIBC_LOG_LOG_H_ */ +#endif /* _COSMO_SOURCE */ diff --git a/libc/mem/gc.h b/libc/mem/gc.h index 3ff3b17d9..263421c53 100644 --- a/libc/mem/gc.h +++ b/libc/mem/gc.h @@ -1,6 +1,6 @@ +#ifdef _COSMO_SOURCE #ifndef COSMOPOLITAN_LIBC_MEM_GC_H_ #define COSMOPOLITAN_LIBC_MEM_GC_H_ -#ifdef _COSMO_SOURCE COSMOPOLITAN_C_START_ libcesque void _gc_free(void *); @@ -19,5 +19,5 @@ libcesque void gclongjmp(void *, int) wontreturn; }) COSMOPOLITAN_C_END_ -#endif /* _COSMO_SOURCE */ #endif /* COSMOPOLITAN_LIBC_MEM_GC_H_ */ +#endif /* _COSMO_SOURCE */ diff --git a/libc/nexgen32e/stackframe.h b/libc/nexgen32e/stackframe.h index 895a109bd..242758bb1 100644 --- a/libc/nexgen32e/stackframe.h +++ b/libc/nexgen32e/stackframe.h @@ -1,6 +1,6 @@ +#ifdef _COSMO_SOURCE #ifndef COSMOPOLITAN_LIBC_NEXGEN32E_STACKFRAME_H_ #define COSMOPOLITAN_LIBC_NEXGEN32E_STACKFRAME_H_ -#ifdef _COSMO_SOURCE COSMOPOLITAN_C_START_ struct StackFrame { @@ -9,5 +9,5 @@ struct StackFrame { }; COSMOPOLITAN_C_END_ -#endif /* _COSMO_SOURCE */ #endif /* COSMOPOLITAN_LIBC_NEXGEN32E_STACKFRAME_H_ */ +#endif /* _COSMO_SOURCE */ diff --git a/libc/runtime/stack.h b/libc/runtime/stack.h index dd5270634..01522ad7c 100644 --- a/libc/runtime/stack.h +++ b/libc/runtime/stack.h @@ -1,6 +1,6 @@ +#ifdef _COSMO_SOURCE #ifndef COSMOPOLITAN_LIBC_RUNTIME_STACK_H_ #define COSMOPOLITAN_LIBC_RUNTIME_STACK_H_ -#ifdef _COSMO_SOURCE /** * Returns preferred size and alignment of thread stack. @@ -156,5 +156,5 @@ int FreeCosmoStack(void *) libcesque; COSMOPOLITAN_C_END_ #endif /* GNU ELF */ -#endif /* _COSMO_SOURCE */ #endif /* COSMOPOLITAN_LIBC_RUNTIME_STACK_H_ */ +#endif /* _COSMO_SOURCE */ diff --git a/libc/stdio/append.h b/libc/stdio/append.h index fd248705d..4ff526a3a 100644 --- a/libc/stdio/append.h +++ b/libc/stdio/append.h @@ -1,6 +1,6 @@ +#ifdef _COSMO_SOURCE #ifndef COSMOPOLITAN_LIBC_STDIO_APPEND_H_ #define COSMOPOLITAN_LIBC_STDIO_APPEND_H_ -#ifdef _COSMO_SOURCE #define APPEND_COOKIE 21578 @@ -32,5 +32,5 @@ ssize_t kappendf(char **, const char *, ...) libcesque; ssize_t kvappendf(char **, const char *, va_list) libcesque; COSMOPOLITAN_C_END_ -#endif /* _COSMO_SOURCE */ #endif /* COSMOPOLITAN_LIBC_STDIO_APPEND_H_ */ +#endif /* _COSMO_SOURCE */ diff --git a/libc/x/x.h b/libc/x/x.h index 39335fc91..dca4b877a 100644 --- a/libc/x/x.h +++ b/libc/x/x.h @@ -1,7 +1,7 @@ +#ifdef _COSMO_SOURCE #ifndef COSMOPOLITAN_LIBC_X_H_ #define COSMOPOLITAN_LIBC_X_H_ -#ifdef _COSMO_SOURCE #define xwrite __xwrite #define xdie __xdie #define xmalloc __xmalloc @@ -32,9 +32,7 @@ #define xfixpath __xfixpath #define xslurp __xslurp #define xbarf __xbarf -#endif /* _COSMO_SOURCE */ -#ifdef _COSMO_SOURCE COSMOPOLITAN_C_START_ int xwrite(int, const void *, uint64_t); @@ -97,5 +95,5 @@ void *xslurp(const char *, size_t *) int xbarf(const char *, const void *, size_t); COSMOPOLITAN_C_END_ -#endif /* _COSMO_SOURCE */ #endif /* COSMOPOLITAN_LIBC_X_H_ */ +#endif /* _COSMO_SOURCE */