00001 /* $Id: unlink.c,v 1.1 2006/11/20 13:38:01 tho Exp $ */ 00002 00003 #include <u/libu_conf.h> 00004 00005 #ifndef HAVE_UNLINK 00006 00007 int unlink(const char *pathname) 00008 { 00009 #if OS_WIN 00010 return DeleteFile(pathname) ? 0 /* success */: -1 /* failure */; 00011 #else 00012 #error "unimplemented" 00013 #endif 00014 } 00015 00016 #else 00017 #include <unistd.h> 00018 int unlink(const char *); 00019 #endif 00020