Repository navigation
Musl build 04 conditionals #4673
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
peppergrayxyz
wants to merge
20
commits into
ptitSeb:main
Choose a base branch
from
peppergrayxyz:musl_build_04_conditionals
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
34ead5a
conditional: execinfo.h
peppergrayxyz a54fcdd
conditional: mallopt
peppergrayxyz 7b43ab6
conditional: malloc_trim
peppergrayxyz 2aeb995
conditional: mallinfo, mallinfo2
peppergrayxyz 491a255
conditional: _pthread_cleanup_push/pop
peppergrayxyz b6a86e9
conditional: pthread_attr_get/setaffinity_np
peppergrayxyz ed3e32c
conditional: __pthread_mutex_s->__kind
peppergrayxyz 7d5f8c9
conditional: dlvsym
peppergrayxyz 4aad99a
conditional: obstack_vprintf
peppergrayxyz 10e8e0c
conditional: struct obstack
peppergrayxyz 43dda3f
conditional: siginfo_t
peppergrayxyz 5ae453a
conditional: getprotobyname/number_r
peppergrayxyz 425ef91
conditional: struct __res_state
peppergrayxyz a2456b7
conditional: RTLD_DL_SYMENT/LINKMAP
peppergrayxyz c0022ab
conditional: scandirat
peppergrayxyz 67ac3c4
conditional: __ctype_b/tolower/toupper_loc
peppergrayxyz 3e4b4f8
conditional: glob_t
peppergrayxyz 3e93ba0
conditional: posix_spawn_file_actions_t
peppergrayxyz 0d09038
conditional: __NFDBITS
peppergrayxyz e9d0d5c
conditional: __chk_fail
peppergrayxyz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| // SPDX-License-Identifier: MIT | ||
| #ifndef _BOX64_LIBC_CTYPE_H_ | ||
| #define _BOX64_LIBC_CTYPE_H_ | ||
|
|
||
| #ifdef HAVE_CTYPE_B_LOC_EXT | ||
|
|
||
| #include <stdint.h> | ||
|
|
||
| const unsigned short **__ctype_b_loc(void); | ||
| const int32_t **__ctype_tolower_loc(void); | ||
| const int32_t **__ctype_toupper_loc(void); | ||
| #endif | ||
|
|
||
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| // SPDX-License-Identifier: MIT | ||
| #ifndef _BOX64_LIBC_DIRENT_H_ | ||
| #define _BOX64_LIBC_DIRENT_H_ | ||
|
|
||
| #ifndef HAVE_SCANDIRAT | ||
| int scandirat(int dirfd, const char *dirp, struct dirent ***namelist, | ||
| int (*filter)(const struct dirent *),int (*compar)(const struct dirent**, const struct dirent **)); | ||
| #endif | ||
|
|
||
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| // SPDX-License-Identifier: MIT | ||
| #ifndef _BOX64_LIBC_GLOB_H_ | ||
| #define _BOX64_LIBC_GLOB_H_ | ||
|
|
||
| #ifndef GLOB_APPEND | ||
| #define GLOB_APPEND (1 << 5) | ||
| #endif | ||
|
|
||
| #ifndef GLOB_ALTDIRFUNC | ||
| # define GLOB_ALTDIRFUNC (1 << 9) | ||
| #endif | ||
|
|
||
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| // SPDX-License-Identifier: MIT | ||
| #ifndef _BOX64_LIBC_MALLOC_H_ | ||
| #define _BOX64_LIBC_MALLOC_H_ | ||
|
|
||
| #ifndef HAVE_MALLINFO | ||
| struct mallinfo { | ||
| int arena; | ||
| int ordblks; | ||
| int smblks; | ||
| int hblks; | ||
| int hblkhd; | ||
| int usmblks; | ||
| int fsmblks; | ||
| int uordblks; | ||
| int fordblks; | ||
| int keepcost; | ||
| }; | ||
| #endif | ||
|
|
||
| #ifndef HAVE_MALLINFO2 | ||
| struct mallinfo2 { | ||
| size_t arena; | ||
| size_t ordblks; | ||
| size_t smblks; | ||
| size_t hblks; | ||
| size_t hblkhd; | ||
| size_t usmblks; | ||
| size_t fsmblks; | ||
| size_t uordblks; | ||
| size_t fordblks; | ||
| size_t keepcost; | ||
| }; | ||
| #endif | ||
|
|
||
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| // SPDX-License-Identifier: MIT | ||
| #ifndef _BOX64_LIBC_NETDB_H_ | ||
| #define _BOX64_LIBC_NETDB_H_ | ||
|
|
||
| #ifndef HAVE_GETPROTOBYNAME_R | ||
| int getprotobyname_r(const char *name, struct protoent *result_buf, char *buf, size_t buflen, struct protoent **result); | ||
| #endif | ||
|
|
||
| #ifndef HAVE_GETPROTOBYNUMBER_R | ||
| int getprotobynumber_r(int proto, struct protoent *result_buf, char *buf, size_t buflen, struct protoent **result); | ||
| #endif | ||
|
|
||
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| // SPDX-License-Identifier: MIT | ||
| #ifndef _BOX64_LIBC_OBSTACK_H_ | ||
| #define _BOX64_LIBC_OBSTACK_H_ | ||
|
|
||
| #ifndef HAVE_OBSTACK_VPRINTF | ||
| int obstack_vprintf(struct obstack *obstack, const char *fmt, va_list args); | ||
| #endif | ||
|
|
||
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| // SPDX-License-Identifier: MIT | ||
| #ifndef _BOX64_LIBC_SELECT_H_ | ||
| #define _BOX64_LIBC_SELECT_H_ | ||
|
|
||
| #ifndef __NFDBITS | ||
| #ifdef NFDBITS | ||
| #define __NFDBITS NFDBITS | ||
| #else | ||
| #error NFDBITS not defined by libc | ||
| #endif | ||
| #endif | ||
|
|
||
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| // SPDX-License-Identifier: MIT | ||
| #ifndef __MYDLFCN_H_ | ||
| #define __MYDLFCN_H_ | ||
|
|
||
| #include <dlfcn.h> | ||
|
|
||
| #ifndef RTLD_DL_SYMENT | ||
| #define RTLD_DL_SYMENT 1 | ||
| #endif | ||
| #ifndef RTLD_DL_LINKMAP | ||
| #define RTLD_DL_LINKMAP 2 | ||
| #endif | ||
|
|
||
| #endif // __MYDLFCN_H_ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe all those checks should go in another file and just include it here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
second this. also is it necessary to enable these checks for non-musl targets?