1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-01 20:30:28 +02:00

(SIZE_MAX, PTRDIFF_MIN, PTRDIFF_MAX): Only define when

they aren't defined already.
This commit is contained in:
Marius Vollmer 2001-06-25 00:57:59 +00:00
parent 62af908b27
commit 6aed915c79

View file

@ -4200,10 +4200,18 @@ scm_i_big2dbl (SCM b)
# endif # endif
#endif #endif
#ifndef SIZE_MAX
#define SIZE_MAX ((size_t) (-1)) #define SIZE_MAX ((size_t) (-1))
#endif
#ifndef PTRDIFF_MIN
/* the below is not really guaranteed to work (I think), but probably does: */ /* the below is not really guaranteed to work (I think), but probably does: */
#define PTRDIFF_MIN ((ptrdiff_t) ((ptrdiff_t)1 << (sizeof (ptrdiff_t) * 8 - 1))) #define PTRDIFF_MIN ((ptrdiff_t) ((ptrdiff_t)1 << (sizeof (ptrdiff_t)*8 - 1)))
#endif
#ifndef PTRDIFF_MAX
#define PTRDIFF_MAX (~ PTRDIFF_MIN) #define PTRDIFF_MAX (~ PTRDIFF_MIN)
#endif
#define NUM2INTEGRAL scm_num2short #define NUM2INTEGRAL scm_num2short
#define INTEGRAL2NUM scm_short2num #define INTEGRAL2NUM scm_short2num