00001 #include <u/libu_conf.h> 00002 #ifndef HAVE_GETPID 00003 00004 pid_t getpid() 00005 { 00006 #ifdef OS_WIN 00007 return GetCurrentProcessId(); 00008 #else 00009 #error "unimplemented" 00010 #endif 00011 } 00012 #else 00013 #include <sys/types.h> 00014 #include <unistd.h> 00015 pid_t getpid(void); 00016 #endif