diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 2002-02-11 13:51:40 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 2002-02-11 13:51:40 +0000 |
commit | 429efbf7c2416a997d2ee5ca2d790cfdc944358b (patch) | |
tree | 13ea7ba24ad95fef48af5f6bffdee0c2f861c99d /byterun/main.c | |
parent | 7f765d521eb9014f42fdf0a83d3c31be897d8dd6 (diff) |
Ajout Sys.executable_name, laisser Sys.argv.(0) inchange (PR#817)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4375 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'byterun/main.c')
-rw-r--r-- | byterun/main.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/byterun/main.c b/byterun/main.c index acc5acf34..9afd3f2be 100644 --- a/byterun/main.c +++ b/byterun/main.c @@ -22,10 +22,6 @@ extern void caml_main (char **); -#ifdef __linux__ -#include <unistd.h> -#endif - #ifdef _WIN32 extern void expand_command_line (int *, char ***); #endif @@ -41,15 +37,6 @@ int main(int argc, char **argv) /* Expand wildcards and diversions in command line */ expand_command_line(&argc, &argv); #endif -#ifdef __linux__ - /* Recover argv[0] from /proc/self/exe, much more reliable */ - char exename[1024]; - int retcode = readlink("/proc/self/exe", exename, sizeof(exename)); - if (retcode != -1 && retcode < sizeof(exename)) { - exename[retcode] = 0; - argv[0] = exename; - } -#endif #if macintosh rotatecursor_options (&something_to_do, 0, NULL); #endif /* macintosh */ |