]> git.proxmox.com Git - wasi-libc.git/commitdiff
Move `weak` attribute to front (#310)
authorAndrew Brown <andrew.brown@intel.com>
Tue, 26 Jul 2022 23:12:17 +0000 (16:12 -0700)
committerGitHub <noreply@github.com>
Tue, 26 Jul 2022 23:12:17 +0000 (16:12 -0700)
This is a follow-up based on @sbc100's comments in #306.

libc-bottom-half/sources/__wasilibc_initialize_environ.c

index 4a8bb1a3e824eeb78936e1bd8e260205aa1ab3d2..2d31c5d03a9217306352a0993b2e227ca8ee91e1 100644 (file)
@@ -11,7 +11,7 @@
 /// Statically-initialize it to an invalid pointer value so that we can
 /// detect if it's been explicitly initialized (we can't use `NULL` because
 /// `clearenv` sets it to NULL.
-char **__wasilibc_environ weak = (char **)-1;
+weak char **__wasilibc_environ = (char **)-1;
 
 // See the comments in libc-environ.h.
 void __wasilibc_ensure_environ(void) {
@@ -87,8 +87,7 @@ void __wasilibc_deinitialize_environ(void) {
 }
 
 // See the comments in libc-environ.h.
-weak
-void __wasilibc_maybe_reinitialize_environ_eagerly(void) {
+weak void __wasilibc_maybe_reinitialize_environ_eagerly(void) {
     // This version does nothing. It may be overridden by a version which does
     // something if `environ` is used.
 }