Go to the first, previous, next, last section, table of contents.


Optional Features in File Support

POSIX defines certain system-specific options in the system calls for operating on files. Some systems support these options and others do not. Since these options are provided in the kernel, not in the library, simply using the GNU C library does not guarantee any of these features is supported; it depends on the system you are using. They can also vary between file systems on a single machine.

This section describes the macros you can test to determine whether a particular option is supported on your machine. If a given macro is defined in `unistd.h', then its value says whether the corresponding feature is supported. (A value of -1 indicates no; any other value indicates yes.) If the macro is undefined, it means particular files may or may not support the feature.

Since all the machines that support the GNU C library also support NFS, one can never make a general statement about whether all file systems support the _POSIX_CHOWN_RESTRICTED and _POSIX_NO_TRUNC features. So these names are never defined as macros in the GNU C library.

Macro: int _POSIX_CHOWN_RESTRICTED
If this option is in effect, the chown function is restricted so that the only changes permitted to nonprivileged processes is to change the group owner of a file to either be the effective group ID of the process, or one of its supplementary group IDs. See section File Owner.

Macro: int _POSIX_NO_TRUNC
If this option is in effect, file name components longer than NAME_MAX generate an ENAMETOOLONG error. Otherwise, file name components that are too long are silently truncated.

Macro: unsigned char _POSIX_VDISABLE
This option is only meaningful for files that are terminal devices. If it is enabled, then handling for special control characters can be disabled individually. See section Special Characters.

If one of these macros is undefined, that means that the option might be in effect for some files and not for others. To inquire about a particular file, call pathconf or fpathconf. See section Using pathconf.


Go to the first, previous, next, last section, table of contents.