From: sof Date: Fri, 31 Oct 2003 16:48:45 +0000 (+0000) Subject: [project @ 2003-10-31 16:48:45 by sof] X-Git-Tag: Approx_11550_changesets_converted~297 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=9c00deb57f96d71d6cdad6ce973f235bdfffc2ab;p=ghc-hetmet.git [project @ 2003-10-31 16:48:45 by sof] prog_name: use '\' as separator with mingw builds. merge to stable --- diff --git a/ghc/rts/RtsFlags.c b/ghc/rts/RtsFlags.c index a7ba83f..6de188a 100644 --- a/ghc/rts/RtsFlags.c +++ b/ghc/rts/RtsFlags.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: RtsFlags.c,v 1.70 2003/09/17 21:20:16 sof Exp $ + * $Id: RtsFlags.c,v 1.71 2003/10/31 16:48:45 sof Exp $ * * (c) The AQUA Project, Glasgow University, 1994-1997 * (c) The GHC Team, 1998-1999 @@ -457,7 +457,7 @@ usage_text[] = { 0 }; -static __inline__ rtsBool +static inline rtsBool strequal(const char *a, const char * b) { return(strcmp(a, b) == 0); @@ -498,7 +498,13 @@ setupRtsFlags(int *argc, char *argv[], int *rts_argc, char *rts_argv[]) char *last_slash; /* Remove directory from argv[0] -- default files in current directory */ - if ((last_slash = (char *) strrchr(argv[0], '/')) != NULL) { + if ((last_slash = (char *) strrchr(argv[0], +#if !defined(mingw32_TARGET_OS) + '/') +#else + '\\') +#endif + ) != NULL) { prog_name = last_slash+1; } else { prog_name = argv[0];