]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
mach: Drop SNARF_ARGS macro
authorSergey Bugaev <bugaevc@gmail.com>
Wed, 3 Jan 2024 17:14:39 +0000 (20:14 +0300)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Wed, 3 Jan 2024 20:59:55 +0000 (21:59 +0100)
We're obtaining arguments from the stack differently, see init-first.c.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
sysdeps/mach/sysdep.h
sysdeps/mach/x86/sysdep.h

index 8eeac45bad73a6e1cf4037cfe2a70ee6b5eb34fc..3e0553d80fe348e2d8f8c0f25aeb242d8acc9afa 100644 (file)
 /* This is not used on all machines.  */
 #endif
 
-/* Set variables ARGC, ARGV, and ENVP for the arguments
-   left on the stack by the microkernel.  */
-#ifndef SNARF_ARGS
-#define SNARF_ARGS(argc, argv, envp)
-#error SNARF_ARGS not defined by sysdeps/mach/MACHINE/sysdep.h
-#endif
-
 /* LOSE can be defined as the `halt' instruction or something
    similar which will cause the process to die in a characteristic
    way suggesting a bug.  */
index ed9f7f462a5c438782f242db2ae1ef70763b1cae..63be5638e8fcb17f3f3dc17a0d3f035d59fc752b 100644 (file)
 
 #define LOSE asm volatile ("hlt")
 
-#define SNARF_ARGS(entry_sp, argc, argv, envp)                               \
-  do                                                                         \
-    {                                                                        \
-      char **p;                                                                      \
-      argc = (int) *entry_sp;                                                \
-      argv = (char **) (entry_sp + 1);                                       \
-      p = argv;                                                                      \
-      while (*p++ != NULL)                                                   \
-       ;                                                                     \
-      if (p >= (char **) argv[0])                                            \
-       --p;                                                                  \
-      envp = p;                                                              \
-    } while (0)
-
 #define STACK_GROWTH_DOWN
 
 /* Get the machine-independent Mach definitions.  */