sl@0: /* sl@0: * Copyright (c) 1998-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: * sl@0: */ sl@0: sl@0: sl@0: // connectors for re-entrant system calls sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include /* we just need the limits */ sl@0: #include sl@0: #include sl@0: sl@0: sl@0: EXPORT_C long sl@0: sysconf(int name) sl@0: sl@0: { sl@0: int retval = 0 ; sl@0: sl@0: switch (name) sl@0: { sl@0: case -1: sl@0: { sl@0: retval = -1 ; sl@0: errno = EINVAL ; sl@0: break ; sl@0: } sl@0: case _SC_ARG_MAX: sl@0: { sl@0: retval = 20 ; //KMaxArgC ; sl@0: break; sl@0: } sl@0: sl@0: case _SC_CLK_TCK: sl@0: { sl@0: retval = CLK_TCK ; sl@0: break ; sl@0: } sl@0: sl@0: case _SC_OPEN_MAX: sl@0: { sl@0: retval = OPEN_MAX ; sl@0: break ; sl@0: } sl@0: sl@0: case _SC_JOB_CONTROL : sl@0: { sl@0: retval = 1 ; sl@0: break ; sl@0: } sl@0: sl@0: sl@0: case _SC_IOV_MAX : sl@0: { sl@0: retval = IOV_MAX ; sl@0: break ; sl@0: } sl@0: sl@0: case _SC_SAVED_IDS : sl@0: { sl@0: retval = -1 ; sl@0: break ; sl@0: } sl@0: sl@0: case _SC_NGROUPS_MAX : //Suplimentary groups not supported sl@0: case _SC_CHILD_MAX : //Needs imp of getrlimit sl@0: { sl@0: errno = ENOSYS ; sl@0: retval = -1 ; sl@0: break ; sl@0: } sl@0: sl@0: case _SC_2_C_DEV : //c99, yac lex utilities are not there sl@0: case _SC_2_C_BIND : sl@0: case _SC_2_FORT_DEV: // FORTAN development utilities not supported sl@0: case _SC_2_FORT_RUN :// FORTAN Run time utilities not supported sl@0: case _SC_2_UPE : //User portability not supported sl@0: case _SC_2_CHAR_TERM : //as UPE is not supported sl@0: case _SC_2_SW_DEV: //utilities such as nm and strip are not supported sl@0: case _SC_2_LOCALEDEF ://No support for supports Locale Creation Utilities option sl@0: { sl@0: retval = -1 ; sl@0: break ; sl@0: } sl@0: sl@0: case _SC_PAGESIZE : sl@0: { sl@0: retval = getpagesize() ; sl@0: break ; sl@0: } sl@0: sl@0: default : sl@0: { sl@0: errno = ENOSYS ; sl@0: retval = -1 ; sl@0: break ; sl@0: } sl@0: } sl@0: sl@0: return retval ; sl@0: }