summaryrefslogtreecommitdiff
path: root/pathconf.c
blob: 5379c68a3719036ce9ae4aae78e6bd224d1ed85e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>

static void dump(const char *p)
{
    printf("_PC_FILESIZEBITS = %ld\n", pathconf(p, _PC_FILESIZEBITS));
    printf("_PC_LINK_MAX = %ld\n", pathconf(p, _PC_LINK_MAX));
    printf("_PC_MAX_CANON = %ld\n", pathconf(p, _PC_MAX_CANON));
    printf("_PC_MAX_INPUT = %ld\n", pathconf(p, _PC_MAX_INPUT));
    printf("_PC_NAME_MAX = %ld\n", pathconf(p, _PC_NAME_MAX));
    printf("_PC_PATH_MAX = %ld\n", pathconf(p, _PC_PATH_MAX));
    printf("_PC_PIPE_BUF = %ld\n", pathconf(p, _PC_PIPE_BUF));
}

int main(int argc, char *argv[])
{
    dump(argv[1] ? argv[1]:".");
    return 0;
}