/*
Copyright (C) 1997-2008 ZSNES Team ( zsKnight, _Demo_, pagefault, Nach )

http://www.zsnes.com
http://sourceforge.net/projects/zsnes
https://zsnes.bountysource.com

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/

#ifndef LIB_H
#define LIB_H

#include <sys/stat.h>

/* usleep was obsolescent in POSIX.1-2001 and removed in POSIX.1-2008, so it
   is invisible under _POSIX_C_SOURCE=200809L. nanosleep replaced it. */
void zsleep_us(unsigned int usec);

#ifndef HAVE_AT_FUNCTIONS

#ifndef AT_FDCWD
#define AT_FDCWD -2
#endif

#ifndef AT_SYMLINK_NOFOLLOW
#define AT_SYMLINK_NOFOLLOW 1
#endif

int fstatat(int dirfd, const char* pathname, struct stat* buf, int flags);

#endif

#endif
