Ruby: include/ruby/backward/2/limits.h File Reference

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

Macros
limits.h File Reference

Historical shim for `<limits.h>`. More...

`#include "ruby/internal/config.h"`
`#include "ruby/backward/2/long_long.h"`

Go to the source code of this file.

## Macros
#define | LONG_MAX 2147483647L
#define | LONG_MIN (-LONG_MAX-1)
#define | CHAR_BIT 8
#define | LLONG_MAX 9223372036854775807LL
#define | LLONG_MIN (-LLONG_MAX-1)
#define | SIZE_MAX ULLONG_MAX
#define | SIZE_MIN ULLONG_MIN
#define | SSIZE_MAX LLONG_MAX
#define | SSIZE_MIN LLONG_MIN

## Detailed Description

Historical shim for `<limits.h>`.

Author
  Ruby developers ruby-.nosp@m.core.nosp@m.@ruby.nosp@m.-lan.nosp@m.g.org

Copyright
  This file is a part of the programming language Ruby. Permission is hereby granted, to either redistribute and/or modify this file, provided that the conditions mentioned in the file COPYING are met. Consult the file for details.

Warning
  Symbols prefixed with either `RBIMPL` or `rbimpl` are implementation details. Don't take them as canon. They could rapidly appear then vanish. The name (path) of this header file is also an implementation detail. Do not expect it to persist at the place it is now. Developers are free to move it anywhere anytime at will.

Note
  To ruby-core: remember that this header can be possibly recursively included from extension libraries written in C++. Do not expect for instance `__VA_ARGS__` is always available. We assume C99 for ruby itself but we don't assume languages of extension libraries. They could be written in C++98.

The macros in this header file are obsolescent. Does anyone really need our own definition of CHAR_BIT today?

Definition in file limits.h.

## Macro Definition Documentation

## ◆ CHAR_BIT

#define CHAR_BIT 8

Definition at line 44 of file limits.h.

## ◆ LLONG_MAX

#define LLONG_MAX 9223372036854775807LL

Definition at line 55 of file limits.h.

## ◆ LLONG_MIN

#define LLONG_MIN (-LLONG_MAX-1)

Definition at line 65 of file limits.h.

## ◆ LONG_MAX

#define LONG_MAX 2147483647L

Definition at line 36 of file limits.h.

## ◆ LONG_MIN

#define LONG_MIN (-LONG_MAX-1)

Definition at line 40 of file limits.h.

## ◆ SIZE_MAX

#define SIZE_MAX ULLONG_MAX

Definition at line 71 of file limits.h.

## ◆ SIZE_MIN

#define SIZE_MIN ULLONG_MIN

Definition at line 72 of file limits.h.

## ◆ SSIZE_MAX

#define SSIZE_MAX LLONG_MAX

Definition at line 87 of file limits.h.

## ◆ SSIZE_MIN

#define SSIZE_MIN LLONG_MIN

Definition at line 88 of file limits.h.