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: Contains the source for fchdir sl@0: * sl@0: */ sl@0: sl@0: sl@0: #include sl@0: #include "reent.h" sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include "sysif.h" sl@0: #include "sysreent.h" sl@0: sl@0: sl@0: /* sl@0: The fchdir() function shall be equivalent to chdir() except that sl@0: the directory that is to be the new current working directory is sl@0: specified by the file descriptor fildes.A conforming application sl@0: can obtain a file descriptor for a file of type directory using sl@0: open(), provided that the file status flags and access modes do sl@0: not contain O_WRONLY or O_RDWR. sl@0: sl@0: Upon successful completion, fchdir() shall return 0. Otherwise, sl@0: it shall return -1 and set errno to indicate the error. sl@0: sl@0: Calls the reentrant version of the function. sl@0: */ sl@0: extern "C" { sl@0: EXPORT_C int fchdir(int filedesc) sl@0: { sl@0: return _fchdir_r(&errno, filedesc); sl@0: } sl@0: sl@0: } sl@0: