source: git/omalloc/omlimits.h.in @ b36d80c

fieker-DuValspielwiese
Last change on this file since b36d80c was 341696, checked in by Hans Schönemann <hannes@…>, 15 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
RevLine 
[8d0069]1/* -*-c++-*- */
2/*******************************************************************
3 *  File:    mylimits.h
[13fe1b]4 *  Purpose: limits.h configuration for omalloc
[8d0069]5 *  Author:  hannes (Hans Schoenemann)
6 *  Created: 03/01
[341696]7 *  Version: $Id$
[8d0069]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/*
[c00c08]21 *    ISO C Standard: 4.14/2.2.4.2 Limits of integral types        <limits.h>
[8d0069]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.  */
[c00c08]28#define SHRT_MAX        32767
[8d0069]29
30/* Maximum value an `unsigned short int' can hold.  (Minimum is 0.)  */
[c00c08]31#define USHRT_MAX        65535
[8d0069]32
[fb6c8e]33/* Maximum/minimum value an `signed int' can hold. */
[c00c08]34#define INT_MAX        2147483647
[fb6c8e]35#define INT_MIN (-INT_MAX-1)
[1639b9]36
[8d0069]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
[c00c08]40# define LONG_MAX        9223372036854775807L
41# define ULONG_MAX      18446744073709551615UL
[8d0069]42#else
[c00c08]43# define LONG_MAX        2147483647L
[8d0069]44# ifdef __STDC__
[c00c08]45#  define ULONG_MAX      4294967295UL
[8d0069]46# else
[c00c08]47#  define ULONG_MAX      4294967295L
[8d0069]48# endif
49#endif
[c00c08]50#define LONG_MIN        (-LONG_MAX - 1L)
[8d0069]51
52#endif
Note: See TracBrowser for help on using the repository browser.