/**************************************************************************/
/*                                                                        */
/*                                 Sources                                */
/*                                from  the                               */
/*                           XSC SOFTWARE PACKAGE                         */
/*                                                                        */
/*                Copyright (c) 1997 University of Karlsruhe              */
/*                     Institute for Appl. Mathematics                    */
/*                                                                        */
/* This program is free software for non-commercial use. For details, see */
/* the file LICENSE.XSC, distributed with this software package.          */
/*                                                                        */
/* This program is distributed WITHOUT ANY WARRANTY. For details, see the */
/* file LICENSE.XSC, distributed with this software package.              */
/*                                                                        */
/**************************************************************************/

/* RCS $Id: o_defs.h,v 1.4 1997/09/25 16:44:17 ae59 Exp $ */
/*
$Log: o_defs.h,v $
 * Revision 1.4  1997/09/25  16:44:17  ae59
 * Copyright-message
 *
 * Revision 1.3  1996/03/22  15:08:58  ae59
 * Hardware support for RS6000 with precise and imprecise (default) traps
 *
 * Revision 1.2  1995/06/28  11:50:15  ae59
 * added b_64bt.h to support accumulator for 64 bit
 *
 * Revision 1.1  1994/01/27  13:23:36  ae59
 * Put under RCS control
 *
 */
/****************************************************************/
/*                                                              */
/*      Filename        : o_defs.h                              */
/*                                                              */
/*      Description     : definitions included by all runtime   */
/*                        source files                          */
/*                                                              */
/*      Date            : 1993-12-20                            */
/*      1993-12-20 : make file idempotent         =b=           */
/*      1993-12-07 : no more g_fnam.h             =b=           */
/*      1993-12-03 : add IBM_EMX_c                =b=           */
/*      1993-12-01 : add DEC_ARITH                =b=           */
/*      1993-01-15 : unique flag for    ZORTECH_c =b=           */
/*      1992-11-30 : include time.h for ZORTECH_c =b=           */
/*      1992-07-21 : sun4_cpp_c    added        =b=             */
/*      1992-07-03 : rs6000 switch added        =b=             */
/*      1992-04-08 : use varargs VAX_UNIX_C     =b=             */
/*      1992-04-02 : use stdargs SUN4_GNU_C     =b=             */
/*      1992-01-28 : HP_9000_C with stddef.h/DEC_ULTRIX_C       */
/*      1992-01-23 : SUN4_GNU_C installed                       */
/*      1991-08-27 : IBM_PS2_C: CLOCKS_PER_SEC=1000000          */
/*      1991-07-11 : HP_9000_C: CLOCKS_PER_SEC=100              */
/*      1991-06-20 : IBM_AT_TURBO_C: CLOCKS_PER_SEC=CLK_TCK     */
/*      1991-05-14 : GNU_C finds size_t somewhere else          */
/*      1991-04-23 : IBM_370_C: CLOCKS_PER_SEC=CLK_TCK          */
/*      1991-04-19 : GNU_C without <float.h>,CLOCKS_PER_SEC=0   */
/*      1991-04-15 : path delimiter character specified (unused)*/
/*      1991-02-25 : include <time.h>                           */
/*      1991-02-21 : IBM_PS2_C requires <varargs.h>             */
/*      1991-01-17 : CONVEX1_UNIX_C considered                  */
/*      1991-01-07 : a_defs.h included                          */
/*      1990-11-26 : undefine AIX if not IBM_RT_C               */
/*      1990-10-12 : SUN4_OS4_C (memory.h)                      */
/*      1990-10-09 : SUN4_OS4_C (no stddef.h/no stdarg.h)       */
/*      1990-10-23 : <varargs.h>,<stdarg.h>                     */
/****************************************************************/

#ifndef _O_DEFS_LOADED 
#define _O_DEFS_LOADED 

#ifdef AIX
#include "/u/p88c/runtime/o_slct.h"
#else
#include "o_slct.h"
#endif

#if IBM_RT_C+IBM_RS6000_C
#else
#undef AIX
#endif

#include <ctype.h>
#if SUN4_GNU_C
int toupper(int c);
#endif

#if GNU_C+ZORTECH_C
#include <varargs.h>
/* #define _VA_LIST_ */
#endif
#include <stdio.h>
#if SUN4_CPP_C
#include <sysent.h>
#define remove(path)    unlink(path)
#endif

#if IBM_RT_C+IBM_RS6000_C+HP_9000_C+CONVEX1_UNIX_C
#define remove(path)    unlink(path)
#else
#if SUN4_GNU_C
int fclose(FILE *stream);
int fflush(FILE *stream);
int fprintf(FILE *stream,const char *format,...);
int fgetc(FILE *stream);
int fputc(int c,FILE *stream);
int ungetc(int c, FILE *stream);
int sscanf(const char *s,const char *format,...);
int remove(const char *filename);
int _filbuf(FILE *stream);
#endif
#endif

#if IBM_RT_C+SUN4_OS4_C+CONVEX1_UNIX_C /* IBM_RS6000_C weg 140396 cb */
typedef unsigned long int size_t;
#else
#if IBM_370_C
#include <stdefs.h>
#else
#if GNU_C+ZORTECH_C+IBM_EMX_C
#else
#include <stddef.h>
#endif
#endif
#endif

#if IBM_RT_C+HP_9000_C+CONVEX1_UNIX_C /* IBM_RS6000_C weg 140396 cb */
#define remove(path)    unlink(path)
char *calloc();
char *malloc();
char *getenv();
int system();
int abs();
#else
#include <stdlib.h>
#if SUN4_GNU_C
int system(const char *string);
#endif
#endif

/* IBM_RS6000_C weg 140396 cb */
#if IBM_370_C+IBM_RT_C+HP_9000_C+SUN4_OS4_C+CONVEX1_UNIX_C+\
    GNU_C+ZORTECH_C+SUN4_GNU_C+SUN4_CPP_C+IBM_EMX_C
#define DBL_MAX_10_EXP          308
#define DBL_MIN_10_EXP        (-307)
#define DBL_MANT_DIG             53
#else
#include <float.h>
#endif

#define DUMMY_ARGS IBM_PS2_C+IBM_RT_C+IBM_RS6000_C+HP_9000_C+SUN4_OS4_C+CONVEX1_UNIX_C
#if DUMMY_ARGS+DEC_ULTRIX_C+VAX_VMS_C
#include <varargs.h>
#else
#include <stdarg.h>
#endif

#if CONVEX1_UNIX_C
#include <strings.h>
char *memchr();
char *memcpy();
char *memset();
#else
#include <string.h>
#endif
#if IBM_RT_C+IBM_RS6000_C+HP_9000_C+SUN4_OS4_C+SUN4_GNU_C+DEC_ULTRIX_C+\
    SUN4_CPP_C
#include <memory.h>
#endif

#if IBM_RT_C+IBM_RS6000_C+IBM_PS2_C+SUN4_OS4_C+SUN4_GNU_C+SUN4_CPP_C
#define CLOCKS_PER_SEC  (1000000L)
extern long clock();
#else

#if ZORTECH_C+IBM_EMX_C
#include <time.h>
#else
#if GNU_C
#define CLOCKS_PER_SEC  (0)
#else
#if HP_9000_C
/* #include <limits.h> */
#define CLOCKS_PER_SEC  (100)
#else
#include <time.h>
#if ATARI_TURBO_C+T800_HELIOS_C+IBM_370_C+IBM_AT_TURBO_C
#define CLOCKS_PER_SEC  CLK_TCK
#endif
#endif
#endif
#endif
#endif

#ifdef AIX
#include "/u/p88c/runtime/p88rts.h"
#include "/u/p88c/runtime/o_spec.h"
#include "/u/p88c/runtime/o_syst.h"
#include "/u/p88c/runtime/o_type.h"

#include "/u/p88c/runtime/int/a_defs.h"
#include "/u/p88c/runtime/base/b_defs.h"
#include "/u/p88c/runtime/dot/d_defs.h"
#include "/u/p88c/runtime/error/e_defs.h"
#include "/u/p88c/runtime/multi/l_defs.h"
#include "/u/p88c/runtime/real/r_defs.h"

#include "/u/p88c/runtime/o_name.h"

#include "/u/p88c/runtime/o_fcth.h"
#ifdef DEC_ARITH
#include "/u/p88c/runtime/g_fcth.h"
#endif
#else
#include "p88rts.h"
#include "o_spec.h"
#include "o_syst.h"
#include "o_type.h"

#include "a_defs.h"
#include "b_defs.h"
#include "d_defs.h"
#include "e_defs.h"
#include "l_defs.h"
#include "r_defs.h"

#include "o_name.h"

#include "o_fcth.h"
#ifdef DEC_ARITH
#include "g_fcth.h"
#endif
#endif

/* -------- 64 bit accumulator -------------------------------- */
/* redefines r_defs and d_defs macros suitable for 64 bit       */
/* by appending _64 to all constants' names                     */
#ifdef IS_64_BIT
#include "b_64bt.h"
#endif

/* -------- Test constant ------------------------------------- */

/* Heap checking is on if HEAP_CHECK is defined*/
/*#define HEAP_CHECK */

#endif /* _O_DEFS_LOADED */
