blob: c6dea5c5f856a70c4d3fc1649c57f3c5dbde730d [file] [log] [blame] [raw]
#if _WCE >= 4
#include <windows.h>
#include <kfuncs.h>
int dup(int oldfd) {
void *r;
int ok = DuplicateHandle(GetCurrentProcess(), (void *)oldfd, GetCurrentProcess(), &r, 0, 1, DUPLICATE_SAME_ACCESS);
return ok ? (int)r : -1;
}
#endif