X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=Tools%2FCCode%2FSource%2FStrGather%2FStrGather.c;h=8908b430a156c0ae1a68ced5c4452669a5b3fb88;hp=9eb5c5a19e8ae26ba0b9e5c61c358f0df4c8ee90;hb=a7081d204ab70fbdb98ace6e678e5a899c0145d6;hpb=8de9f9e154c4263dffff0be310b891796e78e420 diff --git a/Tools/CCode/Source/StrGather/StrGather.c b/Tools/CCode/Source/StrGather/StrGather.c index 9eb5c5a19e..8908b430a1 100644 --- a/Tools/CCode/Source/StrGather/StrGather.c +++ b/Tools/CCode/Source/StrGather/StrGather.c @@ -48,6 +48,16 @@ Abstract: #define MODE_PARSE 1 #define MODE_SCAN 2 #define MODE_DUMP 3 +// +// Different file separater for Linux and Windows +// +#ifdef __GNUC__ +#define FILE_SEP_CHAR '/' +#define FILE_SEP_STRING "/" +#else +#define FILE_SEP_CHAR '\\' +#define FILE_SEP_STRING "\\" +#endif // // We keep a linked list of these for the source files we process @@ -1583,8 +1593,8 @@ ProcessArgs ( } strcpy (NewList->Str, Argv[1]); - if (NewList->Str[strlen (NewList->Str) - 1] != '\\') { - strcat (NewList->Str, "\\"); + if (NewList->Str[strlen (NewList->Str) - 1] != FILE_SEP_CHAR) { + strcat (NewList->Str, FILE_SEP_STRING); } // // Add it to our linked list