24 #ifndef _QORE_QORELIB_H
26 #define _QORE_QORELIB_H
29 #include <qore/QoreThreadLock.h>
30 #include <qore/qore_bitopts.h>
31 #include <qore/safe_dslist>
39 #include <sys/types.h>
46 #undef _QORE_HAS_QORE_XMLNODE_CLASS
49 #undef _QORE_HAS_QORE_XMLREADER_CLASS
52 #undef _QORE_HAS_QORE_XMLDOC_CLASS
55 #define _QORE_HAS_HARD_TYPING 1
58 #define _QORE_HAS_DBI_EXECRAW 1
61 #define _QORE_HAS_TIME_ZONES 1
64 #define _QORE_HAS_THREAD_RESOURCE_IDS 1
67 #define _QORE_HAS_PREPARED_STATMENT_API 1
70 #define _QORE_HAS_DATASOURCE_ACTIVETRANSACTION 1
73 #define _QORE_HAS_DBI_SELECT_ROW 1
76 #define _QORE_HAS_NUMBER_TYPE 1
79 #define _QORE_HAS_PATH_IS_READABLE 1
82 #define _QORE_HAS_DBI_OPTIONS 1
85 #define _QORE_HAS_FIND_CREATE_TIMEZONE 1
88 #define _QORE_HAS_NUMBER_CONS_WITH_PREC 1
91 #define _QORE_HAS_FILE_OBJECT_HELPER 1
94 #define _QORE_HAS_QUEUE_OBJECT_HELPER 1
98 #define QC_NOOP (1 << 0)
99 #define QC_USES_EXTRA_ARGS (1 << 1)
100 #define QC_CONSTANT_INTERN (1 << 2)
101 #define QC_DEPRECATED (1 << 3)
102 #define QC_RET_VALUE_ONLY (1 << 4)
103 #define QC_RUNTIME_NOOP (1 << 5)
106 #define QC_CONSTANT (QC_CONSTANT_INTERN | QC_RET_VALUE_ONLY)
118 DLLEXPORT
struct tm *
q_localtime(
const time_t *clock,
struct tm *tms);
121 DLLEXPORT
struct tm *
q_gmtime(
const time_t *clock,
struct tm *tms);
139 DLLEXPORT
char *
q_dirname(
const char *path);
142 DLLEXPORT
void *
q_realloc(
void *ptr,
size_t size);
144 #if (!defined _WIN32 && !defined __WIN32__) || defined __CYGWIN__
192 DLLLOCAL FeatureList& operator=(
const FeatureList&);
206 static inline char *
strchrs(
const char *str,
const char *chars) {
208 if (strchr(chars, *str))
216 static inline char *
strnchr(
const char *str,
int len,
char c) {
229 (*str) = tolower(*str);
325 class AbstractQoreZoneInfo;
339 DLLEXPORT
int tz_get_utc_offset(
const AbstractQoreZoneInfo* tz, int64 epoch_offset,
bool &is_dst,
const char *&zone_name);
341 DLLEXPORT
bool tz_has_dst(
const AbstractQoreZoneInfo* tz);
346 #define QORE_OPT_ATOMIC_OPERATIONS "atomic operations"
348 #define QORE_OPT_STACK_GUARD "stack guard"
350 #define QORE_OPT_SIGNAL_HANDLING "signal handling"
352 #define QORE_OPT_RUNTIME_STACK_TRACE "runtime stack tracing"
354 #define QORE_OPT_LIBRARY_DEBUGGING "library debugging"
356 #define QORE_OPT_SHA224 "openssl sha224"
358 #define QORE_OPT_SHA256 "openssl sha256"
360 #define QORE_OPT_SHA384 "openssl sha384"
362 #define QORE_OPT_SHA512 "openssl sha512"
364 #define QORE_OPT_MDC2 "openssl mdc2"
366 #define QORE_OPT_RC5 "openssl rc5"
368 #define QORE_OPT_MD2 "openssl md2"
370 #define QORE_OPT_TERMIOS "termios"
372 #define QORE_OPT_FILE_LOCKING "file locking"
374 #define QORE_OPT_UNIX_USERMGT "unix user management"
376 #define QORE_OPT_UNIX_FILEMGT "unix file management"
378 #define QORE_OPT_FUNC_ROUND "round()"
380 #define QORE_OPT_FUNC_TIMEGM "timegm()"
382 #define QORE_OPT_FUNC_SETEUID "seteuid()"
384 #define QORE_OPT_FUNC_SETEGID "setegid()"
386 #define QORE_OPT_FUNC_SYSTEM "system()"
388 #define QORE_OPT_FUNC_KILL "kill()"
390 #define QORE_OPT_FUNC_FORK "fork()"
392 #define QORE_OPT_FUNC_GETPPID "getppid()"
394 #define QORE_OPT_FUNC_STATVFS "statvfs()"
396 #define QORE_OPT_FUNC_SETSID "setsid()"
398 #define QORE_OPT_FUNC_IS_EXECUTABLE "is_executable()"
402 #define QO_ALGORITHM 1
403 #define QO_FUNCTION 2
431 #define QORE_MAX(a, b) ((a) > (b) ? (a) : (b))
434 #define QORE_MIN(a, b) ((a) < (b) ? (a) : (b))
436 #define QORE_PARAM_NO_ARG (NULL)
439 #ifndef QORE_PATH_MAX
440 #ifdef _XOPEN_PATH_MAX
441 #define QORE_PATH_MAX _XOPEN_PATH_MAX
443 #define QORE_PATH_MAX 1024
470 #endif // _QORE_QORELIB_H