Le 19/12/2017 à 11:11, Yoni Bettan a écrit :
it was added on 2008 902b3d5c39 when introduced cache-utils.[ch]
since then cache-utils.[ch] were removed but **envp was left
behind.
By the way "to be portable it is best to write main to take two
arguments, and use the value of environ" according to
https://www.gnu.org/software/libc/manual/html_node/Program-\
Arguments.html#Program-Arguments
Signed-off-by: Yoni Bettan <address@hidden>
---
V2 -> V3:
since ui/cocoa.c rename main() is using qemu_main() ,because it uses it
inside its main() function, the function qemu_main() can't be removed
V1 -> V2:
removed the ui/cocoa.c renaming of main() function since i thought that we
no longer need qemu_main()
include/qemu-common.h | 2 +-
linux-user/main.c | 2 +-
ui/cocoa.m | 5 ++---
vl.c | 7 +++----
4 files changed, 7 insertions(+), 9 deletions(-)
...
diff --git a/vl.c b/vl.c
index fc8bd9372f..ea17cc34f6 100644
--- a/vl.c
+++ b/vl.c
@@ -35,10 +35,10 @@
#ifdef CONFIG_SDL
#if defined(__APPLE__) || defined(main)
#include <SDL.h>
-int qemu_main(int argc, char **argv, char **envp);
+int qemu_main(int argc, char **argv);
int main(int argc, char **argv)
{
- return qemu_main(argc, argv, NULL);
+ return qemu_main(argc, argv);
}
#undef main
#define main qemu_main
I'm really sorry, but I really think we can remove this part.