os.h 2.2 KB
Newer Older
S
Shengliang Guan 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/*
 * Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
 *
 * This program is free software: you can use, redistribute, and/or modify
 * it under the terms of the GNU Affero General Public License, version 3
 * or later ("AGPL"), as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */

S
os  
Shengliang Guan 已提交
16 17
#ifndef _TD_OS_H_
#define _TD_OS_H_
S
Shengliang Guan 已提交
18 19 20 21 22

#ifdef __cplusplus
extern "C" {
#endif

H
refact  
Hongze Cheng 已提交
23
#include <assert.h>
S
Shengliang Guan 已提交
24
#include <ctype.h>
25

26 27
#include <regex.h>

28
#if !defined(WINDOWS)
dengyihao's avatar
dengyihao 已提交
29
#include <dirent.h>
H
Hongze Cheng 已提交
30
#include <libgen.h>
31
#include <sched.h>
H
Hongze Cheng 已提交
32
#include <unistd.h>
33 34
#include <wordexp.h>

35
#include <sys/ioctl.h>
H
Hongze Cheng 已提交
36 37 38
#include <sys/mman.h>
#include <sys/param.h>
#include <sys/shm.h>
39
#include <sys/stat.h>
H
Hongze Cheng 已提交
40
#include <sys/statvfs.h>
41 42
#include <sys/time.h>
#include <sys/types.h>
H
Hongze Cheng 已提交
43
#include <sys/utsname.h>
S
shm  
Shengliang Guan 已提交
44
#include <sys/wait.h>
H
Hongze Cheng 已提交
45
#include <termios.h>
46 47 48 49

#if defined(DARWIN)
#else
#include <argp.h>
H
Hongze Cheng 已提交
50
#include <sys/prctl.h>
51
#endif
wafwerar's avatar
wafwerar 已提交
52 53
#else

wafwerar's avatar
wafwerar 已提交
54
#ifndef __func__
H
Hongze Cheng 已提交
55
#define __func__ __FUNCTION__
wafwerar's avatar
wafwerar 已提交
56
#endif
wafwerar's avatar
wafwerar 已提交
57
#include <malloc.h>
wafwerar's avatar
wafwerar 已提交
58 59 60 61 62 63
#include <time.h>
#ifndef TD_USE_WINSOCK
#include <winsock2.h>
#else
#include <winsock.h>
#endif
64 65
#endif

66
#include <errno.h>
H
fix  
Hongze Cheng 已提交
67
#include <fcntl.h>
S
Shengliang Guan 已提交
68
#include <float.h>
69
#include <inttypes.h>
H
more  
Hongze Cheng 已提交
70
#include <limits.h>
S
Shengliang Guan 已提交
71 72
#include <locale.h>
#include <math.h>
S
Shengliang Guan 已提交
73
#include <setjmp.h>
S
Shengliang Guan 已提交
74 75
#include <signal.h>
#include <stdarg.h>
H
refact  
Hongze Cheng 已提交
76
#include <stdbool.h>
S
Shengliang Guan 已提交
77
#include <stddef.h>
H
refact  
Hongze Cheng 已提交
78
#include <stdint.h>
H
refact  
Hongze Cheng 已提交
79
#include <stdio.h>
H
refact  
Hongze Cheng 已提交
80 81
#include <stdlib.h>
#include <string.h>
dengyihao's avatar
dengyihao 已提交
82 83 84
#include <wchar.h>
#include <wctype.h>

H
Hongze Cheng 已提交
85 86
#include "osThread.h"

H
refact  
Hongze Cheng 已提交
87 88
#include "osAtomic.h"
#include "osDef.h"
89
#include "osDir.h"
H
refact  
Hongze Cheng 已提交
90
#include "osEndian.h"
H
Hongze Cheng 已提交
91
#include "osEnv.h"
92
#include "osFile.h"
S
locale  
Shengliang Guan 已提交
93
#include "osLocale.h"
S
Shengliang Guan 已提交
94
#include "osLz4.h"
95
#include "osMath.h"
H
refact  
Hongze Cheng 已提交
96
#include "osMemory.h"
S
Shengliang Guan 已提交
97
#include "osRand.h"
98
#include "osSemaphore.h"
H
Hongze Cheng 已提交
99
#include "osSignal.h"
S
Shengliang Guan 已提交
100
#include "osSleep.h"
101 102
#include "osSocket.h"
#include "osString.h"
S
Shengliang Guan 已提交
103 104
#include "osSysinfo.h"
#include "osSystem.h"
S
Shengliang Guan 已提交
105 106
#include "osTime.h"
#include "osTimer.h"
S
Shengliang Guan 已提交
107
#include "osTimezone.h"
H
Hongze Cheng 已提交
108
#include "taoserror.h"
S
Shengliang Guan 已提交
109 110 111 112 113

#ifdef __cplusplus
}
#endif

S
os  
Shengliang Guan 已提交
114
#endif /*_TD_OS_H_*/