mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 03:27:39 +00:00
Supplement _GNU_SOURCE with _COSMO_SOURCE
This commit is contained in:
parent
e6b59bced2
commit
7b8024d088
8 changed files with 8 additions and 14 deletions
1
third_party/musl/hsearch.c
vendored
1
third_party/musl/hsearch.c
vendored
|
@ -27,7 +27,6 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/str/str.h"
|
||||
#define _GNU_SOURCE
|
||||
#include "third_party/musl/search.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
|
|
5
third_party/musl/search.h
vendored
5
third_party/musl/search.h
vendored
|
@ -1,5 +1,6 @@
|
|||
#ifndef COSMOPOLITAN_THIRDPARTY_MUSL_SEARCH_H
|
||||
#define COSMOPOLITAN_THIRDPARTY_MUSL_SEARCH_H
|
||||
/* clang-format off */
|
||||
|
||||
typedef enum { FIND, ENTER } ACTION;
|
||||
typedef enum { preorder, postorder, endorder, leaf } VISIT;
|
||||
|
@ -13,7 +14,7 @@ int hcreate(size_t);
|
|||
void hdestroy(void);
|
||||
ENTRY *hsearch(ENTRY, ACTION);
|
||||
|
||||
#ifdef _GNU_SOURCE
|
||||
#if defined(_GNU_SOURCE) || defined(_COSMO_SOURCE)
|
||||
struct hsearch_data {
|
||||
struct __tab *__tab;
|
||||
unsigned int __unused1;
|
||||
|
@ -38,7 +39,7 @@ void *tfind(const void *, void *const *, int(*)(const void *, const void *));
|
|||
void *tsearch(const void *, void **, int (*)(const void *, const void *));
|
||||
void twalk(const void *, void (*)(const void *, VISIT, int));
|
||||
|
||||
#ifdef _GNU_SOURCE
|
||||
#if defined(_GNU_SOURCE) || defined(_COSMO_SOURCE)
|
||||
struct qelem {
|
||||
struct qelem *q_forw, *q_back;
|
||||
char q_data[1];
|
||||
|
|
3
third_party/musl/tdelete.c
vendored
3
third_party/musl/tdelete.c
vendored
|
@ -26,8 +26,7 @@
|
|||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/mem/mem.h"
|
||||
#include "third_party/musl/search.h"
|
||||
#include "third_party/musl/tsearch.h"
|
||||
#include "third_party/musl/tsearch.internal.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
|
|
4
third_party/musl/tdestroy.c
vendored
4
third_party/musl/tdestroy.c
vendored
|
@ -26,9 +26,7 @@
|
|||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/mem/mem.h"
|
||||
#define _GNU_SOURCE
|
||||
#include "third_party/musl/search.h"
|
||||
#include "third_party/musl/tsearch.h"
|
||||
#include "third_party/musl/tsearch.internal.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
|
|
3
third_party/musl/tfind.c
vendored
3
third_party/musl/tfind.c
vendored
|
@ -25,8 +25,7 @@
|
|||
│ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. │
|
||||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/musl/search.h"
|
||||
#include "third_party/musl/tsearch.h"
|
||||
#include "third_party/musl/tsearch.internal.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
|
|
3
third_party/musl/tsearch.c
vendored
3
third_party/musl/tsearch.c
vendored
|
@ -27,8 +27,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/musl/search.h"
|
||||
#include "third_party/musl/tsearch.h"
|
||||
#include "third_party/musl/tsearch.internal.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
|
|
3
third_party/musl/twalk.c
vendored
3
third_party/musl/twalk.c
vendored
|
@ -25,8 +25,7 @@
|
|||
│ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. │
|
||||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "third_party/musl/search.h"
|
||||
#include "third_party/musl/tsearch.h"
|
||||
#include "third_party/musl/tsearch.internal.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
|
|
Loading…
Reference in a new issue