source: git/omalloc/omlimits.h.in @ 8291be

spielwiese
Last change on this file since 8291be was 341696, checked in by Hans Schönemann <hannes@…>, 14 years ago
Adding Id property to all files git-svn-id: file:///usr/local/Singular/svn/trunk@12231 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$
8 *******************************************************************/
9#ifndef MYLIMITS_H
10#define MYLIMITS_H
11/*******************************************************************
12 * Defines which are set by configure
13 ******************************************************************/
14/* Define sizeof(long) */
15#define SIZEOF_LONG 4
16/* Define sizeof(int) */
17#define SIZEOF_INT 4
18/* Define sizeof(double) */
19#define SIZEOF_DOUBLE 8
20/*
21 *    ISO C Standard: 4.14/2.2.4.2 Limits of integral types        <limits.h>
22 */
23
24/* These assume 8-bit `char's, 16-bit `short int's,
25   and 32-bit `int's and and 32/64-bit `long int's.  */
26
27/* maximum value a `signed short int' can hold.  */
28#define SHRT_MAX        32767
29
30/* Maximum value an `unsigned short int' can hold.  (Minimum is 0.)  */
31#define USHRT_MAX        65535
32
33/* Maximum/minimum value an `signed int' can hold. */
34#define INT_MAX        2147483647
35#define INT_MIN (-INT_MAX-1)
36
37/* Minimum and maximum values a `signed long int' can hold.  */
38/* Maximum value an `unsigned long int' can hold.  (Minimum is 0.)  */
39#if SIZEOF_LONG == 8
40# define LONG_MAX        9223372036854775807L
41# define ULONG_MAX      18446744073709551615UL
42#else
43# define LONG_MAX        2147483647L
44# ifdef __STDC__
45#  define ULONG_MAX      4294967295UL
46# else
47#  define ULONG_MAX      4294967295L
48# endif
49#endif
50#define LONG_MIN        (-LONG_MAX - 1L)
51
52#endif
Note: See TracBrowser for help on using the repository browser.