www.delorie.com/djgpp/doc/libc-2.01/libc_501.html   search  
Go to the first, previous, next, last section, table of contents.


pathconf

Syntax

#include <unistd.h>

long pathconf(const char *filename, int name);

Description

This function returns various system-dependent configuration values. The name is one of the following:

_PC_LINK_MAX
The maximum number of directory entries that can refer to a single real file.
_PC_MAX_CANON
The maximum number of bytes in an editable input line.
_PC_MAX_INPUT
The maximum number of bytes in a non-editable input line.
_PC_NAME_MAX
The maximum length of an individual file name.
_PC_PATH_MAX
The maximum length of a complete path name.
_PC_PIPE_BUF
The size of a pipe's internal buffer.
_PC_CHOWN_RESTRICTED
If non-zero, only privileged user can chown() files, otherwise anyone may give away files.
_PC_NO_TRUNC
If false filenames longer than _PC_NAME_MAX are truncated, otherwise an error occurs if you use longer names.
_PC_VDISABLE
A character to use to disable tty special characters.

Return Value

The selected configuration value is returned.

Example

char *buf = malloc(pathconf("c:/", _PC_MAX_PATH)+1);


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

  prev next   webmaster     delorie software   privacy  
  Copyright © 1997     Updated Apr 1997