/* ex: set ro:
** !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
**
** This file is generated automatically by config/gen/platform.pm
*/
#ifndef 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"
/*
 * $Id: io.h 37201 2009-03-08 12:07:48Z fperrad $
 * Copyright (C) 2004-2008, Parrot Foundation.
 */

#ifndef PARROT_PLATFORM_GENERIC_IO_H_GUARD
#define PARROT_PLATFORM_GENERIC_IO_H_GUARD
/*
 * 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

#endif /* PARROT_PLATFORM_GENERIC_IO_H_GUARD */



/*
** config/gen/platform/generic/math.h:
*/
#line 1 "config/gen/platform/generic/math.h"
/*
 * $Id: math.h 37201 2009-03-08 12:07:48Z fperrad $
 * Copyright (C) 2004-2007, Parrot Foundation.
 */

#ifndef PARROT_PLATFORM_GENERIC_MATH_H_GUARD
#define PARROT_PLATFORM_GENERIC_MATH_H_GUARD
/*
 * 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))

#endif /* PARROT_PLATFORM_GENERIC_MATH_H_GUARD */



/*
** config/gen/platform/generic/dl.h:
*/
#line 1 "config/gen/platform/generic/dl.h"
/*
 * $Id: dl.h 37201 2009-03-08 12:07:48Z fperrad $
 * Copyright (C) 2004-2007, Parrot Foundation.
 */

#ifndef PARROT_PLATFORM_GENERIC_DL_H_GUARD
#define PARROT_PLATFORM_GENERIC_DL_H_GUARD
/*
 * Dynamic loading stuff:
 */

#define PARROT_DLOPEN_FLAGS RTLD_LAZY

#endif /* PARROT_PLATFORM_GENERIC_DL_H_GUARD */



/*
** config/gen/platform/generic/signal.h:
*/
#line 1 "config/gen/platform/generic/signal.h"
/*
 * $Id: signal.h 37201 2009-03-08 12:07:48Z fperrad $
 * Copyright (C) 2004-2007, Parrot Foundation.
 */

#ifndef PARROT_PLATFORM_GENERIC_SIGNAL_H_GUARD
#define PARROT_PLATFORM_GENERIC_SIGNAL_H_GUARD
/*
 * 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); exit(EXIT_FAILURE);
#endif

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

    Parrot_sighandler_t Parrot_set_sighandler(int s, Parrot_sighandler_t f);
#endif /* PARROT_HAS_HEADER_SIGNAL */

#endif /* PARROT_PLATFORM_GENERIC_SIGNAL_H_GUARD */



/*
** config/gen/platform/generic/stat.h:
*/
#line 1 "config/gen/platform/generic/stat.h"
/*
 * $Id: stat.h 37201 2009-03-08 12:07:48Z fperrad $
 * Copyright (C) 2004-2007, Parrot Foundation.
 */

#ifndef PARROT_PLATFORM_GENERIC_STAT_H_GUARD
#define PARROT_PLATFORM_GENERIC_STAT_H_GUARD
/*
 * File stat stuff
 */

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

#endif /* PARROT_PLATFORM_GENERIC_STAT_H_GUARD */



/*
** config/gen/platform/generic/threads.h:
*/
#line 1 "config/gen/platform/generic/threads.h"
/*
 * $Id: threads.h 39976 2009-07-10 08:20:13Z fperrad $
 * Copyright (C) 2004-2007, Parrot Foundation.
 */

#ifndef PARROT_PLATFORM_GENERIC_THREADS_H_GUARD
#define PARROT_PLATFORM_GENERIC_THREADS_H_GUARD
/*
 * POSIX threading stuff
 */

#ifdef PARROT_HAS_THREADS

#  include "parrot/thr_pthread.h"

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

#endif /* PARROT_HAS_THREADS */

#endif /* PARROT_PLATFORM_GENERIC_THREADS_H_GUARD */



#endif /* PARROT_PLATFORM_H_GUARD */

/*
 * Local variables:
 *   c-file-style: "parrot"
 * End:
 * vim: expandtab shiftwidth=4:
 */

