CPPMyth
Library to interoperate with MythTV server
Loading...
Searching...
No Matches
os-types.h
1#pragma once
2
3#ifndef __STDC_FORMAT_MACROS
4#define __STDC_FORMAT_MACROS
5#endif
6
7/* Enable Large File Support (LFS) */
8#ifndef _FILE_OFFSET_BITS
9#define _FILE_OFFSET_BITS 64
10#endif
11
12#include <stdint.h>
13#include <inttypes.h>
14#include <unistd.h>
15#include <string.h>
16#include <errno.h>
17#include <sched.h>
18#include <sys/time.h>
19#include <sys/types.h>
20#include <sys/stat.h>
21
22#if defined(__APPLE__)
23#include <sys/cdefs.h>
24#include <sys/syslimits.h>
25#elif defined(__FreeBSD__)
26#include <limits.h>
27#elif defined(__GNU__) || defined(__linux__) || defined(__sun)
28#include <limits.h>
29#endif
30
31#if defined(__APPLE__)
32#include <stdio.h> /* for fpos_t */
33#include <AvailabilityMacros.h>
34typedef int64_t off64_t;
35typedef off_t __off_t;
36typedef off64_t __off64_t;
37typedef fpos_t fpos64_t;
38#define stat64 stat
39#define statfs64 statfs
40#define fstat64 fstat
41#elif defined(__FreeBSD__)
42#include <stdio.h> /* for fpos_t */
43typedef int64_t off64_t;
44typedef off_t __off_t;
45typedef off64_t __off64_t;
46typedef fpos_t fpos64_t;
47#define stat64 stat
48#define statfs64 statfs
49#define fstat64 fstat
50#endif
51
52#ifndef PATH_MAX
53#warning "PATH_MAX is not defined"
54#define PATH_MAX 256
55#endif
56
57#ifndef PATH_SEPARATOR_CHAR
58#define PATH_SEPARATOR_CHAR '/'
59#define PATH_SEPARATOR_STRING "/"
60#endif
61
62#define INVALID_SOCKET_VALUE (-1)
63typedef int net_socket_t;