Hi,

Le 27/08/2011 16:33, Marco van de Voort a écrit :
Not all permission bits have constants predeclared. Michael and I checked
and Linux/FreeBSD/Darwin all have the upper bits declared like this:

#define S_ISUID         0004000         /* [XSI] set user id on execution */
#define S_ISGID         0002000         /* [XSI] set group id on execution
#define S_ISVTX         0001000         /* [XSI] directory restrcted delete
#define S_ISTXT         S_ISVTX         /* sticky bit: not supported */

Hereby a request to other "unix" port maintainers to check their headers
to see if your OS implements these constants. (Solaris and Haiku mainly I
guess, though the sleeping QNX and netwarelibc ports too I assume)

Note that the latter two are both the sticky bit, the TXT alias is the
original BSD symbol for it, the VTX declaration the current (XSI/POSIX)
name. Most manpages warn that the sticky bit is hardly implemented, so it is
probably less important than the other two.
Under Haiku, those symbols are defined like this in sys/stat.h :

#define S_IUMSK 07777       /* user settable bits */

#define S_ISUID 04000       /* set user id on execution */
#define S_ISGID 02000       /* set group id on execution */

#define S_ISVTX 01000 /* save swapped text even after use (sticky bit) */

S_ISTXT is not declared and i have included S_IUMSK as i thought it might be 
related (but i have no knowledge in that area).

Olivier

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to