mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
4ff3f20540
According to MSVC manual (*1), cl.exe can skip including a header file when that: - contains #pragma once, or - starts with #ifndef, or - starts with #if ! defined. GCC has a similar trick (*2), but it acts more stricter (e. g. there must be _no tokens_ outside of #ifndef...#endif). Sun C lacked #pragma once for a looong time. Oracle Developer Studio 12.5 finally implemented it, but we cannot assume such recent version. This changeset modifies header files so that each of them include strictly one #ifndef...#endif. I believe this is the most portable way to trigger compiler optimizations. [Bug #16770] *1: https://docs.microsoft.com/en-us/cpp/preprocessor/once *2: https://gcc.gnu.org/onlinedocs/cppinternals/Guard-Macros.html
68 lines
2.1 KiB
C++
68 lines
2.1 KiB
C++
#ifndef RUBY_INTERN_H /*-*-C++-*-vi:se ft=cpp:*/
|
|
#define RUBY_INTERN_H 1
|
|
/**
|
|
* @file
|
|
* @author $Author$
|
|
* @date Thu Jun 10 14:22:17 JST 1993
|
|
* @copyright Copyright (C) 1993-2007 Yukihiro Matsumoto
|
|
* @copyright Copyright (C) 2000 Network Applied Communication Laboratory, Inc.
|
|
* @copyright Copyright (C) 2000 Information-technology Promotion Agency, Japan
|
|
* @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.
|
|
*/
|
|
#include "ruby/3/config.h"
|
|
#include "ruby/defines.h"
|
|
|
|
#ifdef HAVE_STDARG_PROTOTYPES
|
|
# include <stdarg.h>
|
|
#else
|
|
# include <varargs.h>
|
|
#endif
|
|
|
|
#include "ruby/st.h"
|
|
|
|
/*
|
|
* Functions and variables that are used by more than one source file of
|
|
* the kernel.
|
|
*/
|
|
|
|
#include "ruby/3/intern/array.h"
|
|
#include "ruby/3/intern/bignum.h"
|
|
#include "ruby/3/intern/class.h"
|
|
#include "ruby/3/intern/compar.h"
|
|
#include "ruby/3/intern/complex.h"
|
|
#include "ruby/3/intern/cont.h"
|
|
#include "ruby/3/intern/dir.h"
|
|
#include "ruby/3/intern/enum.h"
|
|
#include "ruby/3/intern/enumerator.h"
|
|
#include "ruby/3/intern/error.h"
|
|
#include "ruby/3/intern/eval.h"
|
|
#include "ruby/3/intern/file.h"
|
|
#include "ruby/3/intern/gc.h"
|
|
#include "ruby/3/intern/hash.h"
|
|
#include "ruby/3/intern/io.h"
|
|
#include "ruby/3/intern/load.h"
|
|
#include "ruby/3/intern/marshal.h"
|
|
#include "ruby/3/intern/numeric.h"
|
|
#include "ruby/3/intern/object.h"
|
|
#include "ruby/3/intern/parse.h"
|
|
#include "ruby/3/intern/proc.h"
|
|
#include "ruby/3/intern/process.h"
|
|
#include "ruby/3/intern/random.h"
|
|
#include "ruby/3/intern/range.h"
|
|
#include "ruby/3/intern/rational.h"
|
|
#include "ruby/3/intern/re.h"
|
|
#include "ruby/3/intern/ruby.h"
|
|
#include "ruby/3/intern/select.h"
|
|
#include "ruby/3/intern/signal.h"
|
|
#include "ruby/3/intern/sprintf.h"
|
|
#include "ruby/3/intern/string.h"
|
|
#include "ruby/3/intern/struct.h"
|
|
#include "ruby/3/intern/thread.h"
|
|
#include "ruby/3/intern/time.h"
|
|
#include "ruby/3/intern/variable.h"
|
|
#include "ruby/3/intern/vm.h"
|
|
|
|
#endif /* RUBY_INTERN_H */
|