[Add] Give errors on unsupported OS code.
This commit is contained in:
parent
5ed5cf6b6d
commit
243795e068
@ -22,6 +22,8 @@ char* lfile_basePath(void) {
|
|||||||
if(lephisto_base[0] == '\0') {
|
if(lephisto_base[0] == '\0') {
|
||||||
#ifdef LINUX
|
#ifdef LINUX
|
||||||
home = getenv("HOME");
|
home = getenv("HOME");
|
||||||
|
#else
|
||||||
|
#error "Needs implentation."
|
||||||
#endif
|
#endif
|
||||||
snprintf(lephisto_base, PATH_MAX, "%s/.lephisto/", home);
|
snprintf(lephisto_base, PATH_MAX, "%s/.lephisto/", home);
|
||||||
}
|
}
|
||||||
@ -49,6 +51,8 @@ int lfile_dirMakeExist(char* path) {
|
|||||||
WARN("Dir '%s' does not exist and unable to create", path);
|
WARN("Dir '%s' does not exist and unable to create", path);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
#error "Needs implentation."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -75,6 +79,8 @@ int lfile_fileExists(char* path, ...) {
|
|||||||
|
|
||||||
if(stat(file, &buf)==0) /* Stat worked, file must exist. */
|
if(stat(file, &buf)==0) /* Stat worked, file must exist. */
|
||||||
return 1;
|
return 1;
|
||||||
|
#else
|
||||||
|
#error "Needs implementation."
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -117,6 +123,8 @@ char** lfile_readDir(int* lfiles, char* path) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
closedir(d);
|
closedir(d);
|
||||||
|
#else
|
||||||
|
#error "Needs implementation."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* What if we find nothing? */
|
/* What if we find nothing? */
|
||||||
|
Loading…
Reference in New Issue
Block a user