Skip to content

Commit 68b9479

Browse files
committed
Make cosmo.h work a little better
1 parent d9df41c commit 68b9479

File tree

12 files changed

+22
-26
lines changed

12 files changed

+22
-26
lines changed

libc/dce.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
#ifdef _COSMO_SOURCE
12
#ifndef COSMOPOLITAN_LIBC_DCE_H_
23
#define COSMOPOLITAN_LIBC_DCE_H_
3-
#ifdef _COSMO_SOURCE
44
/*─────────────────────────────────────────────────────────────────────────────╗
55
│ cosmopolitan § autotune » dead code elimination │
66
╚─────────────────────────────────────────────────────────────────────────────*/
@@ -125,5 +125,5 @@ int IsQemuUser(void);
125125

126126
COSMOPOLITAN_C_END_
127127
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
128-
#endif /* _COSMO_SOURCE */
129128
#endif /* COSMOPOLITAN_LIBC_DCE_H_ */
129+
#endif /* _COSMO_SOURCE */

libc/dlopen/dlfcn.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,11 @@ void *dlopen(const char *, int) libcesque;
1616
void *dlsym(void *, const char *) libcesque;
1717
int dlclose(void *) libcesque;
1818

19-
#ifdef _COSMO_SOURCE
2019
char *cosmo_dlerror(void) libcesque;
2120
void *cosmo_dlopen(const char *, int) libcesque;
2221
void *cosmo_dlsym(void *, const char *) libcesque;
2322
void *cosmo_dltramp(void *) libcesque;
2423
int cosmo_dlclose(void *) libcesque;
25-
#endif
2624

2725
COSMOPOLITAN_C_END_
2826
#endif /* COSMOPOLITAN_LIBC_DLFCN_H_ */

libc/fmt/itoa.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
#ifdef _COSMO_SOURCE
12
#ifndef COSMOPOLITAN_LIBC_FMT_ITOA_H_
23
#define COSMOPOLITAN_LIBC_FMT_ITOA_H_
3-
#ifdef _COSMO_SOURCE
44
COSMOPOLITAN_C_START_
55

66
#define LengthInt64 __LengthInt64
@@ -42,5 +42,5 @@ libcesque size_t uint64toarray_fixed16(uint64_t, char[hasatleast 17], uint8_t);
4242
libcesque size_t uint64toarray_radix8(uint64_t, char[hasatleast 24]);
4343

4444
COSMOPOLITAN_C_END_
45-
#endif /* _COSMO_SOURCE */
4645
#endif /* COSMOPOLITAN_LIBC_FMT_ITOA_H_ */
46+
#endif /* _COSMO_SOURCE */

libc/fmt/leb128.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
#ifdef _COSMO_SOURCE
12
#ifndef COSMOPOLITAN_LIBC_FMT_LEB128_H_
23
#define COSMOPOLITAN_LIBC_FMT_LEB128_H_
3-
#ifdef _COSMO_SOURCE
44
COSMOPOLITAN_C_START_
55

66
#define sleb64 __sleb64
@@ -16,5 +16,5 @@ int unzleb64(const char *, size_t, int64_t *) libcesque;
1616
int unuleb64(const char *, size_t, uint64_t *) libcesque;
1717

1818
COSMOPOLITAN_C_END_
19-
#endif /* _COSMO_SOURCE */
2019
#endif /* COSMOPOLITAN_LIBC_FMT_LEB128_H_ */
20+
#endif /* _COSMO_SOURCE */

libc/intrin/dll.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
#ifdef _COSMO_SOURCE
12
#ifndef COSMOPOLITAN_LIBC_INTRIN_DLL_H_
23
#define COSMOPOLITAN_LIBC_INTRIN_DLL_H_
3-
#ifdef _COSMO_SOURCE
44
#define dll_make_first __dll_make_first
55
#define dll_make_last __dll_make_last
66
#define dll_remove __dll_remove
@@ -55,5 +55,5 @@ void dll_make_first(struct Dll **, struct Dll *) paramsnonnull((1)) libcesque;
5555
void dll_splice_after(struct Dll *, struct Dll *) paramsnonnull((1)) libcesque;
5656

5757
COSMOPOLITAN_C_END_
58-
#endif /* _COSMO_SOURCE */
5958
#endif /* COSMOPOLITAN_LIBC_INTRIN_DLL_H_ */
59+
#endif /* _COSMO_SOURCE */

libc/intrin/kprintf.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
#ifdef _COSMO_SOURCE
12
#ifndef COSMOPOLITAN_LIBC_INTRIN_KPRINTF_H_
23
#define COSMOPOLITAN_LIBC_INTRIN_KPRINTF_H_
3-
#ifdef _COSMO_SOURCE
44

55
#define klog __klog
66
#define kprintf __kprintf
@@ -54,5 +54,5 @@ void uvprintf(const char *, va_list) libcesque;
5454

5555
COSMOPOLITAN_C_END_
5656
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
57-
#endif /* _COSMO_SOURCE */
5857
#endif /* COSMOPOLITAN_LIBC_INTRIN_KPRINTF_H_ */
58+
#endif /* _COSMO_SOURCE */

libc/log/log.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
#ifdef _COSMO_SOURCE
12
#ifndef COSMOPOLITAN_LIBC_LOG_LOG_H_
23
#define COSMOPOLITAN_LIBC_LOG_LOG_H_
34
#include "libc/stdio/stdio.h"
4-
#ifdef _COSMO_SOURCE
55

66
#define kLogFatal 0
77
#define kLogError 1
@@ -224,5 +224,5 @@ void vffatalf(ARGS, va_list) asm("vflogf") ATTRV relegated wontreturn libcesque;
224224

225225
#endif /* __STRICT_ANSI__ */
226226
COSMOPOLITAN_C_END_
227-
#endif /* _COSMO_SOURCE */
228227
#endif /* COSMOPOLITAN_LIBC_LOG_LOG_H_ */
228+
#endif /* _COSMO_SOURCE */

libc/mem/gc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
#ifdef _COSMO_SOURCE
12
#ifndef COSMOPOLITAN_LIBC_MEM_GC_H_
23
#define COSMOPOLITAN_LIBC_MEM_GC_H_
3-
#ifdef _COSMO_SOURCE
44
COSMOPOLITAN_C_START_
55

66
libcesque void _gc_free(void *);
@@ -19,5 +19,5 @@ libcesque void gclongjmp(void *, int) wontreturn;
1919
})
2020

2121
COSMOPOLITAN_C_END_
22-
#endif /* _COSMO_SOURCE */
2322
#endif /* COSMOPOLITAN_LIBC_MEM_GC_H_ */
23+
#endif /* _COSMO_SOURCE */

libc/nexgen32e/stackframe.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
#ifdef _COSMO_SOURCE
12
#ifndef COSMOPOLITAN_LIBC_NEXGEN32E_STACKFRAME_H_
23
#define COSMOPOLITAN_LIBC_NEXGEN32E_STACKFRAME_H_
3-
#ifdef _COSMO_SOURCE
44
COSMOPOLITAN_C_START_
55

66
struct StackFrame {
@@ -9,5 +9,5 @@ struct StackFrame {
99
};
1010

1111
COSMOPOLITAN_C_END_
12-
#endif /* _COSMO_SOURCE */
1312
#endif /* COSMOPOLITAN_LIBC_NEXGEN32E_STACKFRAME_H_ */
13+
#endif /* _COSMO_SOURCE */

libc/runtime/stack.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
#ifdef _COSMO_SOURCE
12
#ifndef COSMOPOLITAN_LIBC_RUNTIME_STACK_H_
23
#define COSMOPOLITAN_LIBC_RUNTIME_STACK_H_
3-
#ifdef _COSMO_SOURCE
44

55
/**
66
* Returns preferred size and alignment of thread stack.
@@ -156,5 +156,5 @@ int FreeCosmoStack(void *) libcesque;
156156

157157
COSMOPOLITAN_C_END_
158158
#endif /* GNU ELF */
159-
#endif /* _COSMO_SOURCE */
160159
#endif /* COSMOPOLITAN_LIBC_RUNTIME_STACK_H_ */
160+
#endif /* _COSMO_SOURCE */

0 commit comments

Comments
 (0)