13 #ifndef VLCONFIG_INCLUDED_H_
29 #include <ACE/config.h>
45 #include <sys/types.h>
51 #if DT_FD_ZERO_USES_MEMSET
55 #if DT_HAVE_BZERO_PROTO_IN_MEMORY_H
57 #elif DT_HAVE_BZERO_PROTO_IN_CC_LIBC_H
59 #elif DT_HAVE_BZERO_PROTO_IN_BSTRING_H
64 void bzero(
char* b,
int length );
78 #ifdef DtUSE_UTILITIES_NAMESPACE
79 namespace DtUSE_UTILITIES_NAMESPACE
91 #define DtDELETE_VOID(x, cast) \
94 cast* toDelete = reinterpret_cast<cast*>(x); \
101 #define DtISON(a, x) (a & x)
102 #define DtISOFF(a, x) (!DtISON(a, x))
103 #define DtTURNON(a, x) (a |= x)
104 #define DtTURNOFF(a, x) (a &= ~x)
108 #define DtNUMBER(foo) (sizeof(foo)/sizeof(foo[0]))
109 #define DtOFFSET(type, field) ((size_t)&((type *)NULL)->field)
110 #define DtSIZEOF(type, field) sizeof(((type *)NULL)->field)
119 return (
int)ceil( (
float)num / (
float)mult ) * mult;
128 #define DtATOI(s) ((int)(strtoul(s, 0, 0)))
130 #define DtATOI(s) (int)strtol(s, 0, 0)
172 if ( fd >= 0 ) closesocket( fd );
179 if ( fd >= 0 ) close( fd );
198 return DtSelect( maxfd+1, &read, NULL, NULL, timeout );
200 void addRead(
int fd )
202 FD_SET( (
unsigned int)fd, &read0 );
203 maxfd =
DtMax( maxfd, fd );
205 void delRead(
int fd )
207 FD_CLR( (
unsigned int)fd, &read0 );
210 int canRead(
int fd )
212 return ( (
int)( FD_ISSET( (
unsigned int)fd, &read ) ) );
276 if (alignment > 1 && value != (value&alignMask))
292 return reinterpret_cast<void*
>(
alignValue(value, alignment));
297 return reinterpret_cast<void*
>(
alignValue(value, alignment));
311 value &= (alignment-1);
327 #if DT_NO_CASECOMPARE
328 DT_DLL_VLUTIL int strcasecmp(
const char* strA,
const char* strB );
354 #define DT_VXWORKS_APP(name) \
355 int main(int argc, char** argv); \
356 int name(char* cmdLine) \
358 return realMain(DtArgc(cmdLine), DtArgv(cmdLine)); \
362 #ifdef DtUSE_UTILITIES_NAMESPACE