#if !defined(PARROT_PLATFORM_H_GUARD)
#define PARROT_PLATFORM_H_GUARD

/*
** platform.h [generic version]
**
** DO NOT EDIT THIS FILE
**
** Generated by config/gen/platform.pm
*/

/*
** config/gen/platform/generic/io.h:
*/
#line 1 "config/gen/platform/generic/io.h"
/*
 * I/O:
 */

#define DEFAULT_OPEN_MODE S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
#ifndef S_ISREG
#  define S_ISREG(m) ((m & S_IFMT) == S_IFREG)
#endif


/*
** config/gen/platform/generic/math.h:
*/
#line 1 "config/gen/platform/generic/math.h"
/*
 * math related stuff
 */


#ifdef PARROT_HAS_HEADER_MATH
#  include <math.h>
#endif

#  ifndef signbit
#    if NUMVAL_SIZE == 8
#      define signbit(x) Parrot_signbit(x)
#    else

#      define signbit(x) Parrot_signbit_l(x)

#    endif

#
#  endif

#define Parrot_is_nzero(x) ((x) == 0.0 && signbit(x))


/*
** config/gen/platform/generic/dl.h:
*/
#line 1 "config/gen/platform/generic/dl.h"
/*
 * Dynamic loading stuff:
 */

#define PARROT_DLOPEN_FLAGS RTLD_LAZY


/*
** config/gen/platform/generic/signal.h:
*/
#line 1 "config/gen/platform/generic/signal.h"
/*
 * Signal handling stuff
 */

#if defined(PARROT_HAS_HEADER_SIGNAL) && defined(PARROT_HAS_HEADER_SYSTYPES)
#  include <signal.h>
#  include <sys/types.h>
#  define dumpcore() raise(SIGQUIT)
#endif

#ifdef PARROT_HAS_HEADER_SIGNAL
#  undef Parrot_set_sighandler
#  ifdef PARROT_HAS___SIGHANDLER_T
    typedef __sighandler_t Parrot_sighandler_t;
#  else
    typedef void (*Parrot_sighandler_t) (int);
#  endif

    Parrot_sighandler_t Parrot_set_sighandler(int s, Parrot_sighandler_t f);
#endif


/*
** config/gen/platform/generic/stat.h:
*/
#line 1 "config/gen/platform/generic/stat.h"
/*
 * File stat stuff
 */

#ifdef PARROT_HAS_HEADER_SYSSTAT
#  include <sys/stat.h>
#endif


/*
** config/gen/platform/generic/threads.h:
*/
#line 1 "config/gen/platform/generic/threads.h"
/*
 * POSIX threading stuff
 */

#ifdef PARROT_HAS_HEADER_PTHREAD
#  include "parrot/thr_pthread.h"
#endif

#ifdef PARROT_HAS_HEADER_UNISTD
#  include <unistd.h>
#  ifdef _POSIX_PRIORITY_SCHEDULING
#    define YIELD sched_yield()
#  endif
#endif


#endif
