sl@0: /* sl@0: * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * Name : fpathconf.c sl@0: * Part of : libc library sl@0: * gets configurable system variables. sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: #include sl@0: #include //_POSIX_XXXX_XXXX sl@0: #include //_PC_XXXX_XXXX sl@0: sl@0: /* sl@0: * fpathconf -- sl@0: * get configurable system variables. sl@0: * sl@0: sl@0: */ sl@0: EXPORT_C sl@0: long sl@0: fpathconf(int fd, int name) sl@0: { sl@0: long ret = -1; sl@0: #ifdef __SYMBIAN32__ sl@0: fd = fd; /*to fix the warning 'variable/argument not used in function' */ sl@0: #endif //__SYMBIAN32__ sl@0: switch(name) { sl@0: case _PC_LINK_MAX: sl@0: ret = _POSIX_LINK_MAX; sl@0: break; sl@0: case _PC_NAME_MAX: sl@0: ret = _POSIX_NAME_MAX; sl@0: break; sl@0: case _PC_PATH_MAX: sl@0: ret = _POSIX_PATH_MAX; sl@0: break; sl@0: case _PC_PIPE_BUF: sl@0: ret = _POSIX_PIPE_BUF; sl@0: break; sl@0: case _PC_NO_TRUNC: sl@0: ret = _POSIX_NO_TRUNC; sl@0: break; sl@0: case _PC_VDISABLE: //no concept of terminal sl@0: case _PC_MAX_CANON: //no concept of terminal sl@0: case _PC_MAX_INPUT: //no concept of terminal sl@0: case _PC_CHOWN_RESTRICTED: //no concept of ownership sl@0: errno = ENOTSUP; sl@0: break; sl@0: default: sl@0: errno = EINVAL; sl@0: break; sl@0: } sl@0: return ret; sl@0: }