this repo has no description
at fixPythonPipStalling 31 lines 621 B view raw
1// CFLAGS: -framework corefoundation -framework coreservices 2#include <CoreFoundation/CFURL.h> 3#include <Carbon/Carbon.h> 4#include <assert.h> 5#include <string.h> 6#include <stdio.h> 7 8#define TESTPATH "/home" 9 10int main() 11{ 12 CFURLRef url = CFURLCreateWithFileSystemPath(NULL, CFSTR(TESTPATH), kCFURLPOSIXPathStyle, 1); 13 FSRef fsref; 14 Boolean b; 15 char* buffer = (char*) malloc(100); 16 OSStatus status; 17 18 b = CFURLGetFSRef(url, &fsref); 19 assert(b != 0); 20 21 status = FSRefMakePath(&fsref, buffer, 100); 22 assert(status == 0); 23 24 puts(buffer); 25 assert(strcmp(TESTPATH, buffer) == 0); 26 27 free(buffer); 28 CFRelease(url); 29 return 0; 30} 31