File: os.h

package info (click to toggle)
easyh10 1.5-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,544 kB
  • sloc: ansic: 9,049; sh: 8,387; makefile: 77
file content (55 lines) | stat: -rw-r--r-- 899 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef	__OS_H__
#define	__OS_H__

#include <stdio.h>

#if defined(__GNU__) && !defined(MAX_PATH)
#define PATH_MAX 1024
#endif

#if		defined(WIN32) || defined(OS2)
typedef unsigned char	uint8_t;
typedef unsigned int	uint32_t;
typedef unsigned short	uint16_t;

#elif	defined(bsdi) || defined(FREEBSD) || defined(OPENBSD)
#include <sys/types.h>

#else	
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#endif

#if		defined(WIN32)
#define	snprintf	_snprintf
#define snwprintf	_snwprintf
#define	getcwd		_getcwd

#define	PATHCHAR	'\\'
#define	PATHSTR		"\\"

#else

#define	PATHCHAR	'/'
#define	PATHSTR		"/"

#endif

#if		defined(WIN32)
#include <windows.h>

#elif	defined(bsdi) || defined(FREEBSD) || defined(OPENBSD)
#include <sys/param.h>
#define	MAX_PATH	MAXPATHLEN

#else
#include <limits.h>
#define	MAX_PATH	PATH_MAX

#endif

#endif/*__OS_H__*/