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

spielwiese
Last change on this file since e4e36c was 6ce030f, checked in by Oleksandr Motsak <motsak@…>, 12 years ago
removal of the $Id$ svn tag from everywhere NOTE: the git SHA1 may be used instead (only on special places) NOTE: the libraries Singular/LIB/*.lib still contain the marker due to our current use of svn
  • 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 *******************************************************************/
8#ifndef MYLIMITS_H
9#define MYLIMITS_H
10/*******************************************************************
11 * Defines which are set by configure
12 ******************************************************************/
13/* Define sizeof(long) */
14#define SIZEOF_LONG 4
15/* Define sizeof(int) */
16#define SIZEOF_INT 4
17/* Define sizeof(double) */
18#define SIZEOF_DOUBLE 8
19/*
20 *    ISO C Standard: 4.14/2.2.4.2 Limits of integral types        <limits.h>
21 */
22
23/* These assume 8-bit `char's, 16-bit `short int's,
24   and 32-bit `int's and and 32/64-bit `long int's.  */
25
26/* maximum value a `signed short int' can hold.  */
27#define SHRT_MAX        32767
28
29/* Maximum value an `unsigned short int' can hold.  (Minimum is 0.)  */
30#define USHRT_MAX        65535
31
32/* Maximum/minimum value an `signed int' can hold. */
33#define INT_MAX        2147483647
34#define INT_MIN (-INT_MAX-1)
35
36/* Minimum and maximum values a `signed long int' can hold.  */
37/* Maximum value an `unsigned long int' can hold.  (Minimum is 0.)  */
38#if SIZEOF_LONG == 8
39# define LONG_MAX        9223372036854775807L
40# define ULONG_MAX      18446744073709551615UL
41#else
42# define LONG_MAX        2147483647L
43# ifdef __STDC__
44#  define ULONG_MAX      4294967295UL
45# else
46#  define ULONG_MAX      4294967295L
47# endif
48#endif
49#define LONG_MIN        (-LONG_MAX - 1L)
50
51#endif
Note: See TracBrowser for help on using the repository browser.