File: values.h

package info (click to toggle)
musl 1.2.5-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 13,020 kB
  • sloc: ansic: 85,404; asm: 7,109; sh: 809; awk: 301; makefile: 231; sed: 9
file content (39 lines) | stat: -rw-r--r-- 846 bytes parent folder | download | duplicates (19)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef _VALUES_H
#define _VALUES_H

#include <limits.h>

#define CHARBITS   (sizeof(char)   * 8)
#define SHORTBITS  (sizeof(short)  * 8)
#define INTBITS    (sizeof(int)    * 8)
#define LONGBITS   (sizeof(long)   * 8)
#define PTRBITS    (sizeof(char *) * 8)
#define DOUBLEBITS (sizeof(double) * 8)
#define FLOATBITS  (sizeof(float)  * 8)

#define MINSHORT SHRT_MIN
#define MININT   INT_MIN
#define MINLONG  LONG_MIN

#define MAXSHORT SHRT_MAX
#define MAXINT   INT_MAX
#define MAXLONG  LONG_MAX

#define HIBITS   MINSHORT
#define HIBITL   MINLONG

#include <float.h>

#define MAXDOUBLE DBL_MAX
#undef  MAXFLOAT
#define MAXFLOAT  FLT_MAX
#define MINDOUBLE DBL_MIN
#define MINFLOAT  FLT_MIN
#define DMINEXP   DBL_MIN_EXP
#define FMINEXP   FLT_MIN_EXP
#define DMAXEXP   DBL_MAX_EXP
#define FMAXEXP   FLT_MAX_EXP

#define BITSPERBYTE CHAR_BIT

#endif