[Add] Give errors on unsupported OS code.

This commit is contained in:
Allanis 2013-07-12 19:11:10 +01:00
parent 5ed5cf6b6d
commit 243795e068

View File

@ -22,6 +22,8 @@ char* lfile_basePath(void) {
if(lephisto_base[0] == '\0') {
#ifdef LINUX
home = getenv("HOME");
#else
#error "Needs implentation."
#endif
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);
return -1;
}
#else
#error "Needs implentation."
#endif
return 0;
@ -75,6 +79,8 @@ int lfile_fileExists(char* path, ...) {
if(stat(file, &buf)==0) /* Stat worked, file must exist. */
return 1;
#else
#error "Needs implementation."
#endif
return 0;
}
@ -117,6 +123,8 @@ char** lfile_readDir(int* lfiles, char* path) {
}
closedir(d);
#else
#error "Needs implementation."
#endif
/* What if we find nothing? */