1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/genericopenlibs/cstdlib/LSTDIO/FILENO.C Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,48 @@
1.4 +/*
1.5 +* Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +* FUNCTION
1.19 +* <<fileno>>---return file descriptor associated with stream
1.20 +* INDEX
1.21 +* fileno
1.22 +* ANSI_SYNOPSIS
1.23 +* #include <stdio.h>
1.24 +* int fileno(FILE *<[fp]>);
1.25 +* TRAD_SYNOPSIS
1.26 +* #include <stdio.h>
1.27 +* int fileno(<[fp]>)
1.28 +* FILE *<[fp]>;
1.29 +* You can use <<fileno>> to return the file descriptor identified by <[fp]>.
1.30 +* RETURNS
1.31 +* <<fileno>> returns a non-negative integer when successful.
1.32 +* If <[fp]> is not an open stream, <<fileno>> returns -1.
1.33 +* PORTABILITY
1.34 +* <<fileno>> is not part of ANSI C.
1.35 +* POSIX requires <<fileno>>.
1.36 +* Supporting OS subroutines required: none.
1.37 +*
1.38 +*
1.39 +*/
1.40 +
1.41 +
1.42 +
1.43 +#include <stdio.h>
1.44 +#include "LOCAL.H"
1.45 +
1.46 +EXPORT_C int
1.47 +fileno (FILE * f)
1.48 +{
1.49 + CHECK_INIT (f);
1.50 + return __sfileno (f);
1.51 +}