Skip to content

Commit 6575e7d

Browse files
authoredJul 26, 2022
Move weak attribute to front (#310)
This is a follow-up based on @sbc100's comments in #306.
1 parent 613e154 commit 6575e7d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed
 

‎libc-bottom-half/sources/__wasilibc_initialize_environ.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
/// Statically-initialize it to an invalid pointer value so that we can
1212
/// detect if it's been explicitly initialized (we can't use `NULL` because
1313
/// `clearenv` sets it to NULL.
14-
char **__wasilibc_environ weak = (char **)-1;
14+
weak char **__wasilibc_environ = (char **)-1;
1515

1616
// See the comments in libc-environ.h.
1717
void __wasilibc_ensure_environ(void) {
@@ -87,8 +87,7 @@ void __wasilibc_deinitialize_environ(void) {
8787
}
8888

8989
// See the comments in libc-environ.h.
90-
weak
91-
void __wasilibc_maybe_reinitialize_environ_eagerly(void) {
90+
weak void __wasilibc_maybe_reinitialize_environ_eagerly(void) {
9291
// This version does nothing. It may be overridden by a version which does
9392
// something if `environ` is used.
9493
}

0 commit comments

Comments
 (0)
Please sign in to comment.