Subversion Repositories Tewi

Rev

Rev 312 | Rev 318 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 312 Rev 315
Line 1... Line 1...
1
/* $Id: config.c 312 2024-10-13 18:17:37Z nishi $ */
1
/* $Id: config.c 315 2024-10-14 10:01:02Z nishi $ */
2
 
2
 
3
#define SOURCE
3
#define SOURCE
4
 
4
 
5
#include "../config.h"
5
#include "../config.h"
6
 
6
 
7
#include <stdio.h>
7
#include <stdio.h>
8
#include <stdint.h>
8
#include <stdint.h>
9
#include <stdlib.h>
9
#include <stdlib.h>
10
#include <string.h>
10
#include <string.h>
11
#include <sys/stat.h>
11
#include <sys/stat.h>
-
 
12
#include <errno.h>
12
 
13
 
13
#if !defined(_MSC_VER) && !defined(__BORLANDC__)
14
#if !defined(_MSC_VER) && !defined(__BORLANDC__)
14
#include <unistd.h>
15
#include <unistd.h>
15
#endif
16
#endif
16
 
17
 
Line 122... Line 123...
122
	strcpy(config.hostname, "psp");
123
	strcpy(config.hostname, "psp");
123
#elif defined(__PPU__)
124
#elif defined(__PPU__)
124
	strcpy(config.hostname, "ps3");
125
	strcpy(config.hostname, "ps3");
125
#elif defined(__ps2sdk__)
126
#elif defined(__ps2sdk__)
126
	strcpy(config.hostname, "ps2");
127
	strcpy(config.hostname, "ps2");
-
 
128
#elif defined(__NETWARE__)
-
 
129
	strcpy(config.hostname, "netware");
127
#else
130
#else
128
	gethostname(config.hostname, 1024);
131
	gethostname(config.hostname, 1024);
129
#endif
132
#endif
130
#ifdef HAS_CHROOT
133
#ifdef HAS_CHROOT
131
	tw_add_define("HAS_CHROOT");
134
	tw_add_define("HAS_CHROOT");
Line 581... Line 584...
581
			return 1;
584
			return 1;
582
		} else {
585
		} else {
583
			return stop;
586
			return stop;
584
		}
587
		}
585
	} else {
588
	} else {
-
 
589
		printf("%d\n", errno);
586
		cm_log("Config", "Could not open the file");
590
		cm_log("Config", "Could not open the file");
587
		return 1;
591
		return 1;
588
	}
592
	}
589
}
593
}