15 #ifndef VLCONFIG_INCLUDED_H_
42 #include <sys/types.h>
48 #if DT_FD_ZERO_USES_MEMSET
52 #if DT_HAVE_BZERO_PROTO_IN_MEMORY_H
54 #elif DT_HAVE_BZERO_PROTO_IN_CC_LIBC_H
56 #elif DT_HAVE_BZERO_PROTO_IN_BSTRING_H
61 void bzero(
char* b,
int length );
75 #ifdef DtUSE_UTILITIES_NAMESPACE
76 namespace DtUSE_UTILITIES_NAMESPACE
88 #define DtDELETE_VOID(x, cast) \
91 cast* toDelete = reinterpret_cast<cast*>(x); \
98 #define DtISON(a, x) (a & x)
99 #define DtISOFF(a, x) (!DtISON(a, x))
100 #define DtTURNON(a, x) (a |= x)
101 #define DtTURNOFF(a, x) (a &= ~x)
105 #define DtNUMBER(foo) (sizeof(foo)/sizeof(foo[0]))
106 #define DtOFFSET(type, field) ((size_t)&((type *)NULL)->field)
107 #define DtSIZEOF(type, field) sizeof(((type *)NULL)->field)
116 return (
int)ceil( (
float)num / (
float)mult ) * mult;
125 #define DtATOI(s) ((int)(strtoul(s, 0, 0)))
127 #define DtATOI(s) (int)strtol(s, 0, 0)
169 if ( fd >= 0 ) closesocket( fd );
176 if ( fd >= 0 ) close( fd );
195 return DtSelect( maxfd+1, &read, NULL, NULL, timeout );
197 void addRead(
int fd )
199 FD_SET( (
unsigned int)fd, &read0 );
200 maxfd =
DtMax( maxfd, fd );
202 void delRead(
int fd )
204 FD_CLR( (
unsigned int)fd, &read0 );
207 int canRead(
int fd )
209 return ( (
int)( FD_ISSET( (
unsigned int)fd, &read ) ) );
274 if (alignment > 1 && value != (value&alignMask))
290 return reinterpret_cast<void*
>(
alignValue(value, alignment));
295 return reinterpret_cast<void*
>(
alignValue(value, alignment));
306 padding = (~value)+1;
307 padding &= (alignment-1);
325 #if DT_NO_CASECOMPARE
326 DT_DLL_VLUTIL int strcasecmp(
const char* strA,
const char* strB );
352 #define DT_VXWORKS_APP(name) \
353 int main(int argc, char** argv); \
354 int name(char* cmdLine) \
356 return realMain(DtArgc(cmdLine), DtArgv(cmdLine)); \
362 unsigned char * ptr,
unsigned int bytes );
365 #ifdef DtUSE_UTILITIES_NAMESPACE