@c ---------------------------------------------------------------------- @node fpathconf, file system @subheading Syntax @example #include long fpathconf(int fd, int name); @end example @subheading Description Returns configuration information on the filesystem that the open file resides on. @xref{pathconf}. If the filesystem cannot be determined from the file handle @var{fd} (e.g., for character devices), @code{fpathconf} will return the info for the current drive. @subheading Return Value The configuration value; for details, see @ref{pathconf}. @subheading Portability @portability !ansi, posix @c ---------------------------------------------------------------------- @node pathconf, posix @subheading Syntax @example #include long pathconf(const char *filename, int name); @end example @subheading Description This function returns various system-dependent configuration values. The @var{name} is one of the following: @table @code @item _PC_LINK_MAX The maximum number of directory entries that can refer to a single real file. Always 1 in DJGPP. @item _PC_MAX_CANON The maximum number of bytes in an editable input line. In DJGPP, this is 126 (DOS restriction). @item _PC_MAX_INPUT The maximum number of bytes in a non-editable input line. Also 126 in DJGPP. @item _PC_NAME_MAX The maximum length of an individual file name. If the filesystem where @var{filename} resides supports long file names, the result is whatever @code{_get_volume_info} returns (usually 255); otherwise 12 will be returned. @xref{_use_lfn}. @item _PC_PATH_MAX The maximum length of a complete path name. If the filesystem where @var{filename} resides supports long file names, the result is whatever @code{_get_volume_info} returns (usually 260); otherwise 80 will be returned. @xref{_use_lfn}. @item _PC_PIPE_BUF The size of a pipe's internal buffer. In DJGPP, this returns 512. @item _PC_CHOWN_RESTRICTED If non-zero, only priviledged user can change the ownership of files by calling @code{chown}, otherwise anyone may give away files. The DJGPP version always returns zero, since MS-DOS files can be freely given away. @item _PC_NO_TRUNC If zero is returned, filenames longer than what @w{@code{pathconf (filename, _PC_NAME_MAX)}} returns are truncated, otherwise an error occurs if you use longer names. In DJGPP, this returns 0, since DOS always silently truncates long names. @item _PC_VDISABLE A character to use to disable tty special characters. DJGPP currently doesn't support special characters, so this returns -1. @end table @subheading Return Value The selected configuration value is returned. @subheading Portability @portability !ansi, posix @subheading Example @example char *buf = malloc(pathconf("c:/", _PC_MAX_PATH)+1); @end example