search for: my_lchmod

Displaying 1 result from an estimated 1 matches for "my_lchmod".

2007 Oct 16
1
lchmod for osx (was: Symlinks in OS X (10.4.1))
...has written this... Someone with an intel mac should test this to check the uint32_t works there too (I have a powerpc). #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/attr.h> /* !!! */ #include <sys/stat.h> #include <unistd.h> int my_lchmod(const char *path, mode_t mode) { struct attrlist attrList; uint32_t m; /* manpage is wrong! not mode_t, but uint32_t is required */ memset(&attrList, 0, sizeof(attrList)); attrList.bitmapcount = ATTR_BIT_MAP_COUNT; attrList.commonattr = ATT...