os.h 2.3 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 29
#if !defined(WINDOWS)
#include <unistd.h>
dengyihao's avatar
dengyihao 已提交
30
#include <dirent.h>
31 32 33 34 35 36 37
#include <sched.h>
#include <wordexp.h>
#include <libgen.h>

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

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

wafwerar's avatar
wafwerar 已提交
54 55 56
#ifndef __func__
#define __func__ __FUNCTION__ 
#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>

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

#ifdef __cplusplus
}
#endif

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