__noinference__{
#ifndef _SYS_WAIT_H_
#define _SYS_WAIT_H_
#ifndef _time_t_def_
#define _time_t_def_
typedef long time_t;
#endif
#ifndef _pid_t_def_
#define _pid_t_def_
typedef int pid_t;
#endif
#ifndef _suseconds_t_def_
#define _suseconds_t_def_
typedef long suseconds_t;
#endif
#ifndef _id_t_def_
#define _id_t_def_
typedef unsigned long id_t;
#endif
#ifndef _timeval_def_
#define _timeval_def_
struct timeval{
  time_t tv_sec;
  suseconds_t tv_usec;
};
#endif
#ifndef _rusage_def_
#define _rusage_def_
struct rusage{
  struct timeval ru_utime;
  struct timeval ru_stime;
  long ru_maxrss;
  long ru_ixrss;
  long ru_idrss;
  long ru_isrss;
  long ru_minflt;
  long ru_majflt;
  long ru_nswap;
  long ru_inblock;
  long ru_oublock;
  long ru_msgsnd;
  long ru_msgrcv;
  long ru_nsignals;
  long ru_nvcsw;
  long ru_nivcsw;
};
#endif
#ifndef WIFEXITED
#define WIFEXITED(w) (((w) & 0xff) == 0)
#endif
#ifndef WUNTRACED
#define WUNTRACED 2
#endif
#ifndef WTERMSIG
#define WTERMSIG(w) ((w) & 0x7f)
#endif
#ifndef WNOHANG
#define WNOHANG 1
#endif
#ifndef WSTOPSIG
#define WSTOPSIG WEXITSTATUS
#endif
#ifndef WIFSTOPPED
#define WIFSTOPPED(w) (((w) & 0xff) == 0x7f)
#endif
#ifndef WIFSIGNALED
#define WIFSIGNALED(w) (((w) & 0x7f) > 0 && (((w) & 0x7f) < 0x7f))
#endif
#ifndef WEXITSTATUS
#define WEXITSTATUS(w) (((w) >> 8) & 0xff)
#endif

  /* siginfo_t is omitted because it contains a pointer */
  /* waitid is omitted because it needs siginfo_t */
  /*
    extern "C" int waitid(idtype_t, id_t, siginfo_t @, int);
  */
  //__extension__ and __typeof are not supported by Cyclone
#undef __WAIT_INT
#ifndef __WAIT_INT
#define __WAIT_INT(status) (({ union { typeof(status) __in; int __i; } __u; __u.__in = (status); __u.__i; }))
#endif


  extern "C" pid_t wait(int *);

  #define HAVE_WAITPID
  extern "C" pid_t waitpid(pid_t, int *, int);
#endif
}
