1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-01 11:06:46 +02:00

Make sure toxic compiles on MinGW/Win32 again

The config dir stuff is simply broken and needs to be fixed. So for now
disabled it, until someone has time to look into it.
This commit is contained in:
jin-eld
2013-08-27 10:45:21 +03:00
parent 222124742c
commit bb8a2b7700
3 changed files with 44 additions and 10 deletions

View File

@ -49,7 +49,10 @@
char *get_user_config_dir(void)
{
char *user_config_dir;
#ifdef WIN32
#ifdef __WIN32__
#warning Please fix configdir for Win32
return NULL;
#if 0
char appdata[MAX_PATH];
BOOL ok;
@ -62,6 +65,7 @@ char *get_user_config_dir(void)
user_config_dir = strdup(appdata);
return user_config_dir;
#endif
#else /* WIN32 */
@ -126,11 +130,10 @@ char *get_user_config_dir(void)
*/
int create_user_config_dir(char *path)
{
int mkdir_err;
#ifdef WIN32
#ifdef __WIN32__
#warning Please fix configdir for Win32
return -1;
#if 0
char *fullpath = malloc(strlen(path) + strlen(CONFIGDIR) + 1);
strcpy(fullpath, path);
strcat(fullpath, CONFIGDIR);
@ -143,7 +146,11 @@ int create_user_config_dir(char *path)
return -1;
}
free(fullpath);
#endif
#else
int mkdir_err;
mkdir_err = mkdir(path, 0700);
struct stat buf;
@ -163,7 +170,7 @@ int create_user_config_dir(char *path)
return -1;
}
#endif
free(fullpath);
return 0;
#endif
}