use __WINDOWS__

This commit is contained in:
vscosta 2014-11-09 11:16:24 +00:00
parent 10e1080ddd
commit 6958f4ce6d

View File

@ -1535,7 +1535,7 @@ OpenRestore(char *inpf, char *YapLibDir, CELL *Astate, CELL *ATrail, CELL *AStac
}
}
}
#if _MSC_VER || defined(__MINGW32__)
#if __WINDOWS__
if ((inpf = Yap_RegistryGetString("startup"))) {
if (!((splfild = Sopen_file(inpf, "r")) < 0)) {
if ((mode = try_open(inpf,Astate,ATrail,AStack,AHeap,save_buffer,streamp)) != FAIL_RESTORE) {
@ -1553,7 +1553,7 @@ OpenRestore(char *inpf, char *YapLibDir, CELL *Astate, CELL *ATrail, CELL *AStac
!(fatts & FILE_ATTRIBUTE_DIRECTORY)) {
/* couldn't find it where it was supposed to be,
let's try using the executable */
if (!GetModuleFileName( GetCurrentProcess(), LOCAL_FileNameBuf, YAP_FILENAME_MAX)) {
if (!GetModuleFileName( NULL, LOCAL_FileNameBuf, YAP_FILENAME_MAX)) {
/* do nothing */
goto end;
}