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
#include <semaphore.h>
26

27 28
#include <regex.h>

29 30
#if !defined(WINDOWS)
#include <unistd.h>
dengyihao's avatar
dengyihao 已提交
31
#include <dirent.h>
32 33 34 35 36 37 38
#include <sched.h>
#include <wordexp.h>
#include <libgen.h>

#include <sys/utsname.h>
#include <sys/param.h>
#include <sys/mman.h>
39 40 41 42 43 44
#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 已提交
45 46 47
#include <sys/prctl.h>
#include <sys/shm.h>
#include <sys/wait.h>
48 49 50

#if defined(DARWIN)
#else
51
#include <sys/prctl.h>
52 53
#include <argp.h>
#endif
54 55 56

#endif

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

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

wafwerar's avatar
wafwerar 已提交
101
void osDefaultInit();
S
Shengliang Guan 已提交
102 103 104 105 106

#ifdef __cplusplus
}
#endif

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