EpcTools
An event based multi-threaded C++ development framework.
ebase.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2009-2019 Brian Waters
3 * Copyright (c) 2019 Sprint
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17 
18 #ifndef __ebase_h_included
19 #define __ebase_h_included
20 
23 
25 #define True true
26 #define False false
28 
29 #include <sys/time.h>
30 #include <signal.h>
31 #include <string.h>
32 
34 typedef long long int epctime_t;
35 
37 #define EPC_FILENAME_MAX FILENAME_MAX
38 
40 #define epc_gets_s(a,b) __builtin_gets(a)
41 #define epc_strncpy_s(a,b,c,d) __builtin_strncpy(a,c,d);
43 #define epc_sscanf_s __builtin_sscanf
45 #define epc_sprintf_s __builtin_snprintf
47 #define epc_vsnprintf_s __builtin_vsnprintf
49 #define epc_strcpy_s(strDestination, sizeInBytes, strSource) __builtin_strncpy(strDestination, strSource, sizeInBytes)
51 #define epc_strdup(str) __builtin_strdup(str)
53 #define epc_strnicmp(str1, str2, count) __builtin_strncasecmp(str1, str2, count)
55 
57 #define epc_localtime_s(a,b) localtime_r(b,a)
58 #define epc_gmtime_s(a,b) gmtime_r(b,a)
60 
62 #define epc_fseek(a,b,c) fseek(a,b,c)
63 #define epc_access(a,b) access(a,b)
65 #define EACCESS_F_OK F_OK
67 #define EACCESS_R_OK R_OK
69 #define EACCESS_W_OK W_OK
71 
72 #include "etypes.h"
73 
74 #include <stdlib.h>
75 #include <limits.h>
76 
77 // stl
78 #include <cmath>
79 #include <fstream>
80 #include <iomanip>
81 #include <iostream>
82 #include <list>
83 #include <map>
84 #include <memory>
85 #include <set>
86 #include <sstream>
87 #include <string>
88 #include <vector>
89 using namespace std;
90 
93 
94 
95 #endif // #define __ebase_h_included
etypes.h
Contains type definitions used by this library.
epctime_t
long long int epctime_t
time typedef
Definition: ebase.h:34