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 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 46
#include <sys/prctl.h>
#include <sys/shm.h>
#include <sys/wait.h>
47 48 49

#if defined(DARWIN)
#else
50
#include <sys/prctl.h>
51 52
#include <argp.h>
#endif
wafwerar's avatar
wafwerar 已提交
53 54 55 56 57 58 59 60
#else

#include <time.h>
#ifndef TD_USE_WINSOCK
#include <winsock2.h>
#else
#include <winsock.h>
#endif
61 62
#endif

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

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

#ifdef __cplusplus
}
#endif

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