How to convert these constructs to D?

Gary Willoughby dev at nomad.so
Sat Nov 30 06:53:34 PST 2013


I'm porting some C headers and wondered how would i convert the 
following to D:

#define pthread_self() GetCurrentThreadId()

#define pthread_handler_t void * __cdecl

typedef void * (__cdecl *pthread_handler)(void *);

#define set_timespec_nsec(ABSTIME,NSEC) { \
   GetSystemTimeAsFileTime(&((ABSTIME).tv.ft)); \
   (ABSTIME).tv.i64+= (__int64)(NSEC)/100; \
   (ABSTIME).max_timeout_msec= (long)((NSEC)/1000000); \
}


More information about the Digitalmars-d-learn mailing list