dirfd.c revision 235647
1235647Sgleb/*- 2235647Sgleb * Copyright (c) 1989, 1993 3235647Sgleb * The Regents of the University of California. All rights reserved. 4235647Sgleb * 5235647Sgleb * Redistribution and use in source and binary forms, with or without 6235647Sgleb * modification, are permitted provided that the following conditions 7235647Sgleb * are met: 8235647Sgleb * 1. Redistributions of source code must retain the above copyright 9235647Sgleb * notice, this list of conditions and the following disclaimer. 10235647Sgleb * 2. Redistributions in binary form must reproduce the above copyright 11235647Sgleb * notice, this list of conditions and the following disclaimer in the 12235647Sgleb * documentation and/or other materials provided with the distribution. 13235647Sgleb * 3. Neither the name of the University nor the names of its contributors 14235647Sgleb * may be used to endorse or promote products derived from this software 15235647Sgleb * without specific prior written permission. 16235647Sgleb * 17235647Sgleb * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 18235647Sgleb * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19235647Sgleb * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20235647Sgleb * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 21235647Sgleb * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22235647Sgleb * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23235647Sgleb * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24235647Sgleb * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25235647Sgleb * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26235647Sgleb * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27235647Sgleb * SUCH DAMAGE. 28235647Sgleb * 29235647Sgleb * $FreeBSD: head/lib/libc/gen/dirfd.c 235647 2012-05-19 12:44:27Z gleb $ 30235647Sgleb */ 31235647Sgleb 32235647Sgleb#include <sys/cdefs.h> 33235647Sgleb__FBSDID("$FreeBSD: head/lib/libc/gen/dirfd.c 235647 2012-05-19 12:44:27Z gleb $"); 34235647Sgleb 35235647Sgleb#include "namespace.h" 36235647Sgleb#include <sys/param.h> 37235647Sgleb 38235647Sgleb#include <dirent.h> 39235647Sgleb#include "un-namespace.h" 40235647Sgleb 41235647Sgleb#include "gen-private.h" 42235647Sgleb 43235647Sglebint 44235647Sglebdirfd(DIR *dirp) 45235647Sgleb{ 46235647Sgleb 47235647Sgleb return (_dirfd(dirp)); 48235647Sgleb} 49