os.h 2.0 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>
45 46 47

#if defined(DARWIN)
#else
48
#include <sys/prctl.h>
49 50
#include <argp.h>
#endif
51 52 53

#endif

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

S
Shengliang Guan 已提交
73

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

S
Shengliang Guan 已提交
97
void osInit();
S
Shengliang Guan 已提交
98 99 100 101 102

#ifdef __cplusplus
}
#endif

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