source: git/omalloc/mylimits.h.in @ 6bc038

spielwiese
Last change on this file since 6bc038 was 13fe1b, checked in by Hans Schönemann <hannes@…>, 23 years ago
*hannes: DecAlpha-ccc-port git-svn-id: file:///usr/local/Singular/svn/trunk@5409 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 1.6 KB
Line 
1/* -*-c++-*- */
2/*******************************************************************
3 *  File:    mylimits.h
4 *  Purpose: limits.h configuration for omalloc
5 *  Author:  hannes (Hans Schoenemann)
6 *  Created: 03/01
7 *  Version: $Id: mylimits.h.in,v 1.5 2001-04-30 09:01:59 Singular Exp $
8 *******************************************************************/
9#ifndef MYLIMITS_H
10#ifndef sgi
11#define MYLIMITS_H
12#endif
13/*******************************************************************
14 * Defines which are set by configure
15 ******************************************************************/
16/* Define sizeof(long) */
17#define SIZEOF_LONG 4
18/* Define sizeof(int) */
19#define SIZEOF_INT 4
20/* Define sizeof(double) */
21#define SIZEOF_DOUBLE 8
22/*
23 *      ISO C Standard: 4.14/2.2.4.2 Limits of integral types   <limits.h>
24 */
25
26/* These assume 8-bit `char's, 16-bit `short int's,
27   and 32-bit `int's and and 32/64-bit `long int's.  */
28
29/* maximum value a `signed short int' can hold.  */
30#define SHRT_MAX        32767
31
32/* Maximum value an `unsigned short int' can hold.  (Minimum is 0.)  */
33#define USHRT_MAX       65535
34
35/* Maximum/minimum value an `signed int' can hold. */
36#define INT_MAX 2147483647
37#define INT_MIN (-INT_MAX-1)
38
39/* Minimum and maximum values a `signed long int' can hold.  */
40/* Maximum value an `unsigned long int' can hold.  (Minimum is 0.)  */
41#if SIZEOF_LONG == 8
42# define LONG_MAX       9223372036854775807L
43# define ULONG_MAX      18446744073709551615UL
44#else
45# define LONG_MAX       2147483647L
46# ifdef __STDC__
47#  define ULONG_MAX     4294967295UL
48# else
49#  define ULONG_MAX     4294967295L
50# endif
51#endif
52#define LONG_MIN        (-LONG_MAX - 1L)
53
54#endif
Note: See TracBrowser for help on using the repository browser.