/*
 * $Id: errno.h,v 1.7 2000/09/22 22:05:16 k-abe Exp $
 *
 * Copyright (C) 1997-2000 Kota ABE
 */

#ifndef __PTL_ERRNO_H__
#define __PTL_ERRNO_H__

#include <sys/pthread-init.h>

/* ---------------------------------------------------------------- */
#ifdef __PTL_RENAMED__
#define __PTL_ALREADY_RENAMED_ERRNO_H
#else
#include <sys/pthread-before.h>
#endif

#ifdef __GNUC__
#include <00root-gcc/errno.h>
#else
#include <00root-system/errno.h>
#endif

#include <sys/pthread-after.h>
/* ---------------------------------------------------------------- */

/* some system define errno as macro like (*__errno()) */
#undef errno

extern int errno;
#ifndef __NetBSD__		/* NetBSD's __sys_errlist14 */
extern const char *const sys_errlist[];
#endif

#include <pthread-errno.h>

/* ---------------------------------------------------------------- */
#ifdef __PTL_ALREADY_RENAMED_ERRNO_H
#include <sys/pthread-before.h>
#undef __PTL_ALREADY_RENAMED_ERRNO_H
#else
#include <sys/pthread-after.h>
#endif
/* ---------------------------------------------------------------- */


#endif /* __PTL_ERRNO_H__ */
