Developer Guide and Reference

ID 767251
Date 10/31/2024
Public
Document Table of Contents

PXFFPATHCONF

POSIX Subroutine: Gets the value for a configuration option of an opened file.

Module

USE IFPOSIX

CALL PXFFPATHCONF (ifildes,name,ival,ierror)

ifildes

(Input) INTEGER(4). The file descriptor of the opened file.

name

(Input) INTEGER(4). The configurable option.

ival

(Output) INTEGER(4). The value of the configurable option.

ierror

(Output) INTEGER(4). The error status.

If successful, ierror is set to zero; otherwise, an error code.

The PXFFPATHCONF subroutine gets a value for the configuration option named for the opened file with descriptor ifildes.

The configuration option, defined in name, can be obtained by using PXFCONST or IPXFCONST with one of the following constant names:

Constant

Action

_PC_LINK_MAX

Returns the maximum number of links to the file. If ifildes refers to a directory, then the value applies to the whole directory.

_PC_MAX_CANON1

Returns the maximum length of a formatted input line; the file descriptor ifildes must refer to a terminal.

_PC_MAX_INPUT1

Returns the maximum length of an input line; the file descriptor ifildes must refer to a terminal.

_PC_NAME_MAX

Returns the maximum length of a filename in ifildes that the process is allowed to create.

_PC_PATH_MAX

Returns the maximum length of a relative pathname when ifildes is the current working directory.

On Linux* systems, the corresponding macros are defined in <unistd.h>. The values for name can be obtained by using PXFCONST or IPXFCONST when passing the string names of predefined macros in <unistd.h>. The following table shows the corresponding macro names for the above constants:

Constant

Corresponding Macro

_PC_LINK_MAX

_POSIX_LINK_MAX

_PC_MAX_CANON

_POSIX_MAX_CANON

_PC_MAX_INPUT

_POSIX_MAX_INPUT

_PC_NAME_MAX

_POSIX_NAME_MAX

_PC_PATH_MAX

_POSIX_PATH_MAX