16 #if _MSC_VER == 1400 //VC8
17 #if _SECURE_SCL != 0 || _HAS_ITERATOR_DEBUGGING != 0
18 #error Compiler Flags do not match! Do not use _SECURE_SCL or _HAS_ITERATOR_DEBUGGING
19 #endif // _SECURE_SCL != 0 || _HAS_ITERATOR_DEBUGGING != 0
20 #endif //_MSC_VER == 1400
25 #ifndef VLCONFIG_INCLUDED_H_
52 #include <sys/types.h>
58 #if DT_FD_ZERO_USES_MEMSET
62 #if DT_HAVE_BZERO_PROTO_IN_MEMORY_H
64 #elif DT_HAVE_BZERO_PROTO_IN_CC_LIBC_H
66 #elif DT_HAVE_BZERO_PROTO_IN_BSTRING_H
71 void bzero(
char* b,
int length );
85 #ifdef DtUSE_UTILITIES_NAMESPACE
86 namespace DtUSE_UTILITIES_NAMESPACE
98 #define DtDELETE_VOID(x, cast) \
101 cast* toDelete = reinterpret_cast<cast*>(x); \
108 #define DtISON(a, x) (a & x)
109 #define DtISOFF(a, x) (!DtISON(a, x))
110 #define DtTURNON(a, x) (a |= x)
111 #define DtTURNOFF(a, x) (a &= ~x)
115 #define DtNUMBER(foo) (sizeof(foo)/sizeof(foo[0]))
116 #define DtOFFSET(type, field) ((size_t)&((type *)NULL)->field)
117 #define DtSIZEOF(type, field) sizeof(((type *)NULL)->field)
126 return (
int)ceil( (
float)num / (
float)mult ) * mult;
135 #define DtATOI(s) ((int)(strtoul(s, 0, 0)))
137 #define DtATOI(s) (int)strtol(s, 0, 0)
179 if ( fd >= 0 ) closesocket( fd );
186 if ( fd >= 0 ) close( fd );
205 return DtSelect( maxfd+1, &read, NULL, NULL, timeout );
207 void addRead(
int fd )
209 FD_SET( (
unsigned int)fd, &read0 );
210 maxfd =
DtMax( maxfd, fd );
212 void delRead(
int fd )
214 FD_CLR( (
unsigned int)fd, &read0 );
217 int canRead(
int fd )
219 return ( (
int)( FD_ISSET( (
unsigned int)fd, &read ) ) );
284 if (alignment > 1 && value != (value&alignMask))
300 return reinterpret_cast<void*
>(
alignValue(value, alignment));
305 return reinterpret_cast<void*
>(
alignValue(value, alignment));
316 padding = (~value)+1;
317 padding &= (alignment-1);
335 #if DT_NO_CASECOMPARE
336 DT_DLL_VLUTIL int strcasecmp(
const char* strA,
const char* strB );
362 #define DT_VXWORKS_APP(name) \
363 int main(int argc, char** argv); \
364 int name(char* cmdLine) \
366 return realMain(DtArgc(cmdLine), DtArgv(cmdLine)); \
372 unsigned char * ptr,
unsigned int bytes );
375 #ifdef DtUSE_UTILITIES_NAMESPACE