Mercurial > hg > xemacs-beta
comparison src/emacs.c @ 4458:d9b9b5f90386
Provide SHEBANG_PROGNAME on Win32; correct a bug with it and string concat'ing
nt/ChangeLog addition:
2008-05-13 Aidan Kehoe <kehoea@parhasard.net>
* xemacs.mak (PROGRAM_DEFINES):
Provide SHEBANG_PROGNAME on Win32 too.
src/ChangeLog addition:
2008-05-13 Aidan Kehoe <kehoea@parhasard.net>
* emacs.c (SHEBANG_EXE_PROGNAME_LENGTH):
Use WEXTSTRING separately on the two concatenated strings,
avoiding an error on Win32.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Tue, 13 May 2008 20:16:53 +0200 |
parents | ac6231e0c1df |
children | e34711681f30 |
comparison
equal
deleted
inserted
replaced
4457:2fddd822ce87 | 4458:d9b9b5f90386 |
---|---|
956 #endif | 956 #endif |
957 | 957 |
958 #define SHEBANG_PROGNAME_LENGTH \ | 958 #define SHEBANG_PROGNAME_LENGTH \ |
959 (int)((sizeof (WEXTSTRING (SHEBANG_PROGNAME)) - sizeof (WEXTSTRING ("")))) | 959 (int)((sizeof (WEXTSTRING (SHEBANG_PROGNAME)) - sizeof (WEXTSTRING ("")))) |
960 #define SHEBANG_EXE_PROGNAME_LENGTH \ | 960 #define SHEBANG_EXE_PROGNAME_LENGTH \ |
961 (int)(sizeof (WEXTSTRING (SHEBANG_PROGNAME ".exe")) \ | 961 (int)(sizeof (WEXTSTRING (SHEBANG_PROGNAME) WEXTSTRING(".exe")) \ |
962 - sizeof (WEXTSTRING (""))) | 962 - sizeof (WEXTSTRING (""))) |
963 | 963 |
964 { | 964 { |
965 int progname_len = wext_strlen (argv[0]); | 965 int progname_len = wext_strlen (argv[0]); |
966 if (progname_len >= SHEBANG_PROGNAME_LENGTH) | 966 if (progname_len >= SHEBANG_PROGNAME_LENGTH) |