1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* configure.in, bcc32/Makefile.sub, win32/Makefile.sub: define

RUBY_EXPORT to export symbols.

* defines.h: use RUBY_EXTERN instead of EXTERN.

* intern.h, re.h, ruby.h, rubysig.h: ditto.

* win32/win32.h: remove EXTERN definition.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2003-03-04 14:12:19 +00:00
parent 72dfee9a96
commit f3bdfcc416
10 changed files with 117 additions and 99 deletions

View file

@ -1,3 +1,25 @@
Tue Mar 04 23:12:07 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* configure.in, bcc32/Makefile.sub, win32/Makefile.sub: define
RUBY_EXPORT to export symbols.
* defines.h: use RUBY_EXTERN instead of EXTERN.
* intern.h, re.h, ruby.h, rubysig.h: ditto.
* win32/win32.h: remove EXTERN definition.
Mon Mar 03 20:42:51 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* configure.in, bcc32/Makefile.sub, win32/Makefile.sub: define
RUBY_EXPORT to export symbols.
* defines.h: use RUBY_EXTERN instead of EXTERN.
* intern.h, re.h, ruby.h, rubysig.h: ditto.
* win32/win32.h: remove EXTERN definition.
Tue Mar 4 17:54:30 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
* array.c (rb_ary_aref): give warning if index is a symbol.

View file

@ -108,7 +108,7 @@ MISSING = acosh.obj crypt.obj win32.obj
STACK = 0x2000000
!endif
XCFLAGS =
XCFLAGS = -DRUBY_EXPORT
ARFLAGS = /a
LD = ilink32 -q -Gn
@ -341,7 +341,7 @@ s,@OBJEXT@,obj,;t t
s,@XLDFLAGS@,$(XLDFLAGS),;t t
s,@DLDFLAGS@,$(DLDFLAGS),;t t
s,@STATIC@,$(STATIC),;t t
s,@CCDLFLAGS@,-DIMPORT,;t t
s,@CCDLFLAGS@,,;t t
s,@LDSHARED@,$(LDSHARED),;t t
s,@DLEXT@,so,;t t
s,@DLEXT2@,dll,;t t

View file

@ -1169,15 +1169,16 @@ case "$target_os" in
cygwin*)
RUBY_SO_NAME=$target_os-'$(RUBY_INSTALL_NAME)'${MAJOR}${MINOR}
AC_LIBOBJ([strftime])
CCDLFLAGS=-DUSEIMPORTLIB ;;
;;
mingw*)
RUBY_SO_NAME=msvcrt-'$(RUBY_INSTALL_NAME)'${MAJOR}${MINOR}
AC_LIBOBJ([win32])
COMMON_LIBS=m
COMMON_MACROS="WIN32_LEAN_AND_MEAN="
COMMON_HEADERS="windows.h winsock.h"
CCDLFLAGS=-DIMPORT ;;
;;
esac
XCFLAGS="$XCFLAGS -DRUBY_EXPORT"
if test x"$enable_shared" = xyes; then
LIBRUBY_SO='$(RUBY_SO_NAME)'.dll
LIBRUBY_DLDFLAGS='-Wl,--out-implib=$(LIBRUBY) $(RUBYDEF)'

View file

@ -124,17 +124,19 @@ void xfree _((void*));
#include "vms/vms.h"
#endif
#if defined __CYGWIN__
# undef EXTERN
# if defined USEIMPORTLIB
# define EXTERN extern __declspec(dllimport)
# else
# define EXTERN extern __declspec(dllexport)
#undef RUBY_EXTERN
#if defined __CYGWIN__ || defined _WIN32
# ifndef RUBY_EXPORT
# define RUBY_EXTERN extern __declspec(dllimport)
# endif
#endif
#ifndef RUBY_EXTERN
#define RUBY_EXTERN extern
#endif
#ifndef EXTERN
#define EXTERN extern
#define EXTERN RUBY_EXTERN /* deprecated */
#endif
#if defined(sparc) || defined(__sparc__)

View file

@ -124,7 +124,7 @@ VALUE rb_singleton_class _((VALUE));
int rb_cmpint _((VALUE));
/* enum.c */
/* error.c */
EXTERN int ruby_nerrs;
RUBY_EXTERN int ruby_nerrs;
VALUE rb_exc_new _((VALUE, const char*, long));
VALUE rb_exc_new2 _((VALUE, const char*));
VALUE rb_exc_new3 _((VALUE, VALUE));
@ -137,7 +137,7 @@ NORETURN(void rb_load_fail _((char*)));
NORETURN(void rb_error_frozen _((char*)));
void rb_check_frozen _((VALUE));
/* eval.c */
EXTERN struct RNode *ruby_current_node;
RUBY_EXTERN struct RNode *ruby_current_node;
void ruby_set_current_source _((void));
NORETURN(void rb_exc_raise _((VALUE)));
NORETURN(void rb_exc_fatal _((VALUE)));
@ -244,11 +244,11 @@ VALUE rb_hash_delete _((VALUE,VALUE));
int rb_path_check _((char*));
int rb_env_path_tainted _((void));
/* io.c */
EXTERN VALUE rb_fs;
EXTERN VALUE rb_output_fs;
EXTERN VALUE rb_rs;
EXTERN VALUE rb_default_rs;
EXTERN VALUE rb_output_rs;
RUBY_EXTERN VALUE rb_fs;
RUBY_EXTERN VALUE rb_output_fs;
RUBY_EXTERN VALUE rb_rs;
RUBY_EXTERN VALUE rb_default_rs;
RUBY_EXTERN VALUE rb_output_rs;
VALUE rb_io_write _((VALUE, VALUE));
VALUE rb_io_gets _((VALUE));
VALUE rb_io_getc _((VALUE));
@ -299,8 +299,8 @@ VALUE rb_Array _((VALUE));
double rb_cstr_to_dbl _((const char*, int));
double rb_str_to_dbl _((VALUE, int));
/* parse.y */
EXTERN int ruby_sourceline;
EXTERN char *ruby_sourcefile;
RUBY_EXTERN int ruby_sourceline;
RUBY_EXTERN char *ruby_sourcefile;
int ruby_yyparse _((void));
ID rb_id_attrset _((ID));
void rb_parser_append_print _((void));
@ -344,8 +344,8 @@ int rb_reg_options _((VALUE));
void rb_set_kcode _((const char*));
const char* rb_get_kcode _((void));
/* ruby.c */
EXTERN VALUE rb_argv;
EXTERN VALUE rb_argv0;
RUBY_EXTERN VALUE rb_argv;
RUBY_EXTERN VALUE rb_argv0;
void rb_load_file _((char*));
void ruby_script _((char*));
void ruby_prog_init _((void));

2
re.h
View file

@ -35,7 +35,7 @@ long rb_reg_adjust_startpos _((VALUE, VALUE, long, long));
void rb_match_busy _((VALUE));
VALUE rb_reg_quote _((VALUE));
EXTERN int ruby_ignorecase;
RUBY_EXTERN int ruby_ignorecase;
int rb_reg_mbclen2 _((unsigned int, VALUE));
#define mbclen2(c,re) rb_reg_mbclen2((c),(re))

122
ruby.h
View file

@ -225,7 +225,7 @@ void rb_check_safe_str _((VALUE));
#define Check_SafeStr(v) rb_check_safe_str((VALUE)(v))
void rb_secure _((int));
EXTERN int ruby_safe_level;
RUBY_EXTERN int ruby_safe_level;
#define rb_safe_level() (ruby_safe_level)
void rb_set_safe_level _((int));
@ -511,7 +511,7 @@ VALUE rb_iv_set _((VALUE, const char*, VALUE));
VALUE rb_equal _((VALUE,VALUE));
EXTERN VALUE ruby_verbose, ruby_debug;
RUBY_EXTERN VALUE ruby_verbose, ruby_debug;
NORETURN(void rb_raise __((VALUE, const char*, ...)));
NORETURN(void rb_fatal __((const char*, ...)));
@ -541,69 +541,69 @@ void ruby_init _((void));
void ruby_options _((int, char**));
void ruby_run _((void));
EXTERN VALUE rb_mKernel;
EXTERN VALUE rb_mComparable;
EXTERN VALUE rb_mEnumerable;
EXTERN VALUE rb_mPrecision;
EXTERN VALUE rb_mErrno;
EXTERN VALUE rb_mFileTest;
EXTERN VALUE rb_mGC;
EXTERN VALUE rb_mMath;
EXTERN VALUE rb_mProcess;
RUBY_EXTERN VALUE rb_mKernel;
RUBY_EXTERN VALUE rb_mComparable;
RUBY_EXTERN VALUE rb_mEnumerable;
RUBY_EXTERN VALUE rb_mPrecision;
RUBY_EXTERN VALUE rb_mErrno;
RUBY_EXTERN VALUE rb_mFileTest;
RUBY_EXTERN VALUE rb_mGC;
RUBY_EXTERN VALUE rb_mMath;
RUBY_EXTERN VALUE rb_mProcess;
EXTERN VALUE rb_cObject;
EXTERN VALUE rb_cArray;
EXTERN VALUE rb_cBignum;
EXTERN VALUE rb_cClass;
EXTERN VALUE rb_cDir;
EXTERN VALUE rb_cData;
EXTERN VALUE rb_cFalseClass;
EXTERN VALUE rb_cFile;
EXTERN VALUE rb_cFixnum;
EXTERN VALUE rb_cFloat;
EXTERN VALUE rb_cHash;
EXTERN VALUE rb_cInteger;
EXTERN VALUE rb_cIO;
EXTERN VALUE rb_cModule;
EXTERN VALUE rb_cNilClass;
EXTERN VALUE rb_cNumeric;
EXTERN VALUE rb_cProc;
EXTERN VALUE rb_cRange;
EXTERN VALUE rb_cRegexp;
EXTERN VALUE rb_cString;
EXTERN VALUE rb_cSymbol;
EXTERN VALUE rb_cThread;
EXTERN VALUE rb_cTime;
EXTERN VALUE rb_cTrueClass;
EXTERN VALUE rb_cStruct;
RUBY_EXTERN VALUE rb_cObject;
RUBY_EXTERN VALUE rb_cArray;
RUBY_EXTERN VALUE rb_cBignum;
RUBY_EXTERN VALUE rb_cClass;
RUBY_EXTERN VALUE rb_cDir;
RUBY_EXTERN VALUE rb_cData;
RUBY_EXTERN VALUE rb_cFalseClass;
RUBY_EXTERN VALUE rb_cFile;
RUBY_EXTERN VALUE rb_cFixnum;
RUBY_EXTERN VALUE rb_cFloat;
RUBY_EXTERN VALUE rb_cHash;
RUBY_EXTERN VALUE rb_cInteger;
RUBY_EXTERN VALUE rb_cIO;
RUBY_EXTERN VALUE rb_cModule;
RUBY_EXTERN VALUE rb_cNilClass;
RUBY_EXTERN VALUE rb_cNumeric;
RUBY_EXTERN VALUE rb_cProc;
RUBY_EXTERN VALUE rb_cRange;
RUBY_EXTERN VALUE rb_cRegexp;
RUBY_EXTERN VALUE rb_cString;
RUBY_EXTERN VALUE rb_cSymbol;
RUBY_EXTERN VALUE rb_cThread;
RUBY_EXTERN VALUE rb_cTime;
RUBY_EXTERN VALUE rb_cTrueClass;
RUBY_EXTERN VALUE rb_cStruct;
EXTERN VALUE rb_eException;
EXTERN VALUE rb_eStandardError;
EXTERN VALUE rb_eSystemExit;
EXTERN VALUE rb_eInterrupt;
EXTERN VALUE rb_eSignal;
EXTERN VALUE rb_eFatal;
EXTERN VALUE rb_eArgError;
EXTERN VALUE rb_eEOFError;
EXTERN VALUE rb_eIndexError;
EXTERN VALUE rb_eRangeError;
EXTERN VALUE rb_eIOError;
EXTERN VALUE rb_eRuntimeError;
EXTERN VALUE rb_eSecurityError;
EXTERN VALUE rb_eSystemCallError;
EXTERN VALUE rb_eTypeError;
EXTERN VALUE rb_eZeroDivError;
EXTERN VALUE rb_eNotImpError;
EXTERN VALUE rb_eNoMemError;
EXTERN VALUE rb_eNoMethodError;
EXTERN VALUE rb_eFloatDomainError;
RUBY_EXTERN VALUE rb_eException;
RUBY_EXTERN VALUE rb_eStandardError;
RUBY_EXTERN VALUE rb_eSystemExit;
RUBY_EXTERN VALUE rb_eInterrupt;
RUBY_EXTERN VALUE rb_eSignal;
RUBY_EXTERN VALUE rb_eFatal;
RUBY_EXTERN VALUE rb_eArgError;
RUBY_EXTERN VALUE rb_eEOFError;
RUBY_EXTERN VALUE rb_eIndexError;
RUBY_EXTERN VALUE rb_eRangeError;
RUBY_EXTERN VALUE rb_eIOError;
RUBY_EXTERN VALUE rb_eRuntimeError;
RUBY_EXTERN VALUE rb_eSecurityError;
RUBY_EXTERN VALUE rb_eSystemCallError;
RUBY_EXTERN VALUE rb_eTypeError;
RUBY_EXTERN VALUE rb_eZeroDivError;
RUBY_EXTERN VALUE rb_eNotImpError;
RUBY_EXTERN VALUE rb_eNoMemError;
RUBY_EXTERN VALUE rb_eNoMethodError;
RUBY_EXTERN VALUE rb_eFloatDomainError;
EXTERN VALUE rb_eScriptError;
EXTERN VALUE rb_eNameError;
EXTERN VALUE rb_eSyntaxError;
EXTERN VALUE rb_eLoadError;
RUBY_EXTERN VALUE rb_eScriptError;
RUBY_EXTERN VALUE rb_eNameError;
RUBY_EXTERN VALUE rb_eSyntaxError;
RUBY_EXTERN VALUE rb_eLoadError;
EXTERN VALUE rb_defout, rb_stdin, rb_stdout, rb_stderr, ruby_errinfo;
RUBY_EXTERN VALUE rb_defout, rb_stdin, rb_stdout, rb_stderr, ruby_errinfo;
static inline VALUE
#if defined(HAVE_PROTOTYPES)

View file

@ -53,9 +53,9 @@ typedef int rb_atomic_t;
rb_trap_immediate = trap_immediate;\
} while (0)
#endif
EXTERN rb_atomic_t rb_trap_immediate;
RUBY_EXTERN rb_atomic_t rb_trap_immediate;
EXTERN int rb_prohibit_interrupt;
RUBY_EXTERN int rb_prohibit_interrupt;
#define DEFER_INTS (rb_prohibit_interrupt++)
#define ALLOW_INTS do {\
rb_prohibit_interrupt--;\
@ -65,13 +65,13 @@ EXTERN int rb_prohibit_interrupt;
VALUE rb_with_disable_interrupt _((VALUE(*)(ANYARGS),VALUE));
EXTERN rb_atomic_t rb_trap_pending;
RUBY_EXTERN rb_atomic_t rb_trap_pending;
void rb_trap_restore_mask _((void));
EXTERN int rb_thread_critical;
RUBY_EXTERN int rb_thread_critical;
void rb_thread_schedule _((void));
#if defined(HAVE_SETITIMER) && !defined(__BOW__)
EXTERN int rb_thread_pending;
RUBY_EXTERN int rb_thread_pending;
# define CHECK_INTS do {\
if (!rb_prohibit_interrupt) {\
if (rb_trap_pending) rb_trap_exec();\
@ -81,7 +81,7 @@ EXTERN int rb_thread_pending;
} while (0)
#else
/* pseudo preemptive thread switching */
EXTERN int rb_thread_tick;
RUBY_EXTERN int rb_thread_tick;
#define THREAD_TICK 500
#define CHECK_INTS do {\
if (!rb_prohibit_interrupt) {\

View file

@ -99,7 +99,7 @@ ARFLAGS = -machine:$(MACHINE) -out:
CC = $(CC) -nologo
LD = $(CC)
LDSHARED = $(LD) -LD
XCFLAGS =
XCFLAGS = -DRUBY_EXPORT
LDFLAGS = -link -incremental:no -pdb:none
DLDFLAGS = $(LDFLAGS) -dll
XLDFLAGS = -stack:$(STACK)
@ -336,7 +336,7 @@ s,@OBJEXT@,obj,;t t
s,@XLDFLAGS@,$(XLDFLAGS),;t t
s,@DLDFLAGS@,$(DLDFLAGS) $$(LIBPATH) -def:$$(DEFFILE),;t t
s,@STATIC@,$(STATIC),;t t
s,@CCDLFLAGS@,-DIMPORT,;t t
s,@CCDLFLAGS@,,;t t
s,@LDSHARED@,$(LDSHARED),;t t
s,@DLEXT@,so,;t t
s,@DLEXT2@,dll,;t t

View file

@ -9,13 +9,6 @@
*
*/
#undef EXTERN
#if defined(IMPORT)
#define EXTERN extern __declspec(dllimport)
#elif defined(EXPORT)
#define EXTERN extern __declspec(dllexport)
#endif
//
// Definitions for NT port of Perl
//