source: git/libpolys/misc/mylimits.h @ e17f69

spielwiese
Last change on this file since e17f69 was e17f69, checked in by Oleksandr Motsak <motsak@…>, 11 years ago
Correct (?!) pre-processor checks and definitions
  • Property mode set to 100644
File size: 897 bytes
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/* Maximum/minimum value an `signed int' can hold. */
12// #define MAX_INT_VAL        2147483647
13#ifndef MAX_INT_VAL
14#define MAX_INT_VAL     (2147483647)
15#endif
16
17#ifndef MIN_INT_VAL
18#define MIN_INT_VAL     (-MAX_INT_VAL-1)
19#endif
20
21
22// #define ULONG_MAX (~0UL) // ??
23#ifndef ULONG_MAX
24#define ULONG_MAX (~0UL)
25#endif
26
27// TODO: fixing the following BUG (!?) leads to wrong ring::bitmask
28// #if ~0UL != 4294967295UL
29#ifndef LONG_MAX
30#if ULONG_MAX != 4294967295UL
31#define LONG_MAX 9223372036854775807L
32#else
33#define LONG_MAX 2147483647L
34#endif
35#endif
36
37#endif /* _MYLIMITS_H */
Note: See TracBrowser for help on using the repository browser.