mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Remove redundant include headers.
- stdlib.h - stddef.h - stdint.h - stdarg.h - limits.h - float.h
This commit is contained in:
@@ -7,9 +7,6 @@
|
||||
#ifndef MRUBYCONF_H
|
||||
#define MRUBYCONF_H
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/* architecture selection: */
|
||||
/* specify -DMRB_32BIT or -DMRB_64BIT to override */
|
||||
#if !defined(MRB_32BIT) && !defined(MRB_64BIT)
|
||||
|
||||
@@ -133,8 +133,6 @@ mrb_int_mul_overflow(mrb_int a, mrb_int b, mrb_int *c)
|
||||
#endif
|
||||
|
||||
#ifndef MRB_NO_FLOAT
|
||||
# include <stdint.h>
|
||||
# include <float.h>
|
||||
|
||||
# define MRB_FLT_RADIX FLT_RADIX
|
||||
|
||||
|
||||
@@ -111,13 +111,11 @@ MRB_API double mrb_float_read(const char*, char**);
|
||||
#endif
|
||||
|
||||
#if defined _MSC_VER && _MSC_VER < 1900
|
||||
# include <stdarg.h>
|
||||
MRB_API int mrb_msvc_vsnprintf(char *s, size_t n, const char *format, va_list arg);
|
||||
MRB_API int mrb_msvc_snprintf(char *s, size_t n, const char *format, ...);
|
||||
# define vsnprintf(s, n, format, arg) mrb_msvc_vsnprintf(s, n, format, arg)
|
||||
# define snprintf(s, n, format, ...) mrb_msvc_snprintf(s, n, format, __VA_ARGS__)
|
||||
# if _MSC_VER < 1800 && !defined MRB_NO_FLOAT
|
||||
# include <float.h>
|
||||
# define isfinite(n) _finite(n)
|
||||
# define isnan _isnan
|
||||
# define isinf(n) (!_finite(n) && !_isnan(n))
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
*/
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "mrdb.h"
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*/
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <mruby.h>
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -25,8 +25,6 @@ domain_error(mrb_state *mrb, const char *func)
|
||||
/* math functions not provided by Microsoft Visual C++ 2012 or older */
|
||||
#if defined _MSC_VER && _MSC_VER <= 1700
|
||||
|
||||
#include <float.h>
|
||||
|
||||
double
|
||||
asinh(double x)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#include <limits.h>
|
||||
#include <mruby.h>
|
||||
#include <mruby/numeric.h>
|
||||
#include <mruby/presym.h>
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
#include <mruby/string.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#if defined(_WIN32)
|
||||
# include <windows.h>
|
||||
# include <io.h>
|
||||
|
||||
@@ -22,8 +22,6 @@ worldwide. This software is distributed without any warranty.
|
||||
|
||||
See <https://creativecommons.org/publicdomain/zero/1.0/>. */
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/* This is xoshiro128++ 1.0, one of our 32-bit all-purpose, rock-solid
|
||||
generators. It has excellent speed, a state size (128 bits) that is
|
||||
large enough for mild parallelism, and it passes all tests we are aware
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
typedef size_t fsize_t;
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "mruby.h"
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*/
|
||||
|
||||
#include <mruby.h>
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
#include <mruby/string.h>
|
||||
#include <mruby/hash.h>
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#ifndef _WIN32
|
||||
#include <unistd.h>
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
** See Copyright Notice in mruby.h
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <mruby.h>
|
||||
#include <mruby/array.h>
|
||||
#include <mruby/hash.h>
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
#include <mruby/dump.h>
|
||||
#include <mruby/string.h>
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <mruby.h>
|
||||
#include <mruby/array.h>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include <mruby.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifndef MRB_NO_FLOAT
|
||||
/***********************************************************************
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#ifdef MRB_USE_MALLOC_TRIM
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
@@ -24,6 +23,10 @@
|
||||
#include <mruby/throw.h>
|
||||
#include <mruby/presym.h>
|
||||
|
||||
#ifdef MRB_GC_STRESS
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
= Tri-color Incremental Garbage Collection
|
||||
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
** See Copyright Notice in mruby.h
|
||||
*/
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <mruby/dump.h>
|
||||
|
||||
@@ -5,11 +5,8 @@
|
||||
*/
|
||||
|
||||
#ifndef MRB_NO_FLOAT
|
||||
#include <float.h>
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <mruby.h>
|
||||
|
||||
@@ -20,7 +20,6 @@ My modifications in this file are also placed in the public domain.
|
||||
Matz (Yukihiro Matsumoto)
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <errno.h>
|
||||
|
||||
+4
-8
@@ -8,14 +8,6 @@
|
||||
# define _CRT_NONSTDC_NO_DEPRECATE
|
||||
#endif
|
||||
|
||||
#ifndef MRB_NO_FLOAT
|
||||
#include <float.h>
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include <limits.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <mruby.h>
|
||||
#include <mruby/array.h>
|
||||
#include <mruby/class.h>
|
||||
@@ -23,6 +15,10 @@
|
||||
#include <mruby/string.h>
|
||||
#include <mruby/numeric.h>
|
||||
#include <mruby/presym.h>
|
||||
#ifndef MRB_NO_FLOAT
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
typedef struct mrb_shared_string {
|
||||
int refcnt;
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
** See Copyright Notice in mruby.h
|
||||
*/
|
||||
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
#include <mruby.h>
|
||||
#include <mruby/khash.h>
|
||||
|
||||
@@ -4,11 +4,6 @@
|
||||
** See Copyright Notice in mruby.h
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdarg.h>
|
||||
#ifndef MRB_NO_FLOAT
|
||||
#include <math.h>
|
||||
#endif
|
||||
#include <mruby.h>
|
||||
#include <mruby/array.h>
|
||||
#include <mruby/class.h>
|
||||
@@ -25,6 +20,9 @@
|
||||
#include <mruby/throw.h>
|
||||
#include <mruby/dump.h>
|
||||
#include <mruby/presym.h>
|
||||
#ifndef MRB_NO_FLOAT
|
||||
#include <math.h>
|
||||
#endif
|
||||
|
||||
#ifdef MRB_NO_STDIO
|
||||
#if defined(__cplusplus)
|
||||
|
||||
Reference in New Issue
Block a user