os.h 2.1 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
#include <pthread.h>
#include <semaphore.h>
27

28 29
#include <regex.h>

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

#include <sys/utsname.h>
#include <sys/param.h>
#include <sys/mman.h>
40 41 42 43 44 45
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include <termios.h>
#include <sys/statvfs.h>
46 47 48

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

#endif

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

S
Shengliang Guan 已提交
74

H
refact  
Hongze Cheng 已提交
75 76
#include "osAtomic.h"
#include "osDef.h"
77
#include "osDir.h"
H
refact  
Hongze Cheng 已提交
78
#include "osEndian.h"
S
Shengliang Guan 已提交
79
#include "osEnv.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
Shengliang Guan 已提交
85
#include "osRand.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
#include "osThread.h"
S
Shengliang Guan 已提交
94 95
#include "osTime.h"
#include "osTimer.h"
S
Shengliang Guan 已提交
96
#include "osTimezone.h"
S
Shengliang Guan 已提交
97

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

#ifdef __cplusplus
}
#endif

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