# HG changeset patch # User Sascha Wilde # Date 1395745286 -3600 # Node ID 6d64d7e9fa322e476c3392518e746c10cbc52086 # Parent fb3b2d77518f7bf12516ae5ad097e078a9f9eed3 Implemented port_dirname for windows. diff -r fb3b2d77518f -r 6d64d7e9fa32 common/portpath.c --- a/common/portpath.c Tue Mar 25 09:30:51 2014 +0100 +++ b/common/portpath.c Tue Mar 25 12:01:26 2014 +0100 @@ -12,10 +12,14 @@ #ifndef _WIN32 return dirname(path); #else - fprintf(stderr, "Windows Suport missing!"); - abort(); + char drive[_MAX_DRIVE]; + char dir[_MAX_DIR]; + _splitpath(path, drive, dir, NULL, NULL); + /* We assume: drive + dir is shorter than + * drive + dir + fname + ext */ + sprintf(path, "%s%s", drive, dir); + return path; #endif - } char *