ruby-changes:38329
From: nobu <ko1@a...>
Date: Fri, 1 May 2015 13:29:45 +0900 (JST)
Subject: [ruby-changes:38329] nobu:r50410 (trunk): dln.c: use EXPORT_PREFIX
nobu 2015-05-01 13:29:20 +0900 (Fri, 01 May 2015) New Revision: 50410 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50410 Log: dln.c: use EXPORT_PREFIX * configure.in (EXPORT_PREFIX): define exported symbol prefix string in config.h. * dln.c (FUNCNAME_PREFIX): use configured EXPORT_PREFIX, not hardcoded condition. Modified files: trunk/configure.in trunk/dln.c Index: configure.in =================================================================== --- configure.in (revision 50409) +++ configure.in (revision 50410) @@ -3983,6 +3983,7 @@ AC_SUBST(SYMBOL_PREFIX) https://github.com/ruby/ruby/blob/trunk/configure.in#L3983 AC_SUBST(MINIOBJS) AC_SUBST(THREAD_MODEL) AC_SUBST(PLATFORM_DIR) +AC_DEFINE_UNQUOTED(EXPORT_PREFIX, "$EXPORT_PREFIX") firstmf=`echo $FIRSTMAKEFILE | sed 's/:.*//'` firsttmpl=`echo $FIRSTMAKEFILE | sed 's/.*://'` Index: dln.c =================================================================== --- dln.c (revision 50409) +++ dln.c (revision 50410) @@ -106,13 +106,7 @@ dln_loaderror(const char *format, ...) https://github.com/ruby/ruby/blob/trunk/dln.c#L106 # define USE_DLN_DLOPEN #endif -#ifndef FUNCNAME_PATTERN -# if defined(__hp9000s300) || ((defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)) && !defined(__ELF__)) || defined(__BORLANDC__) || defined(NeXT) || defined(__WATCOMC__) || defined(MACOSX_DYLD) -# define FUNCNAME_PREFIX "_Init_" -# else -# define FUNCNAME_PREFIX "Init_" -# endif -#endif +#define FUNCNAME_PREFIX EXPORT_PREFIX"Init_" #if defined __CYGWIN__ || defined DOSISH #define isdirsep(x) ((x) == '/' || (x) == '\\') -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/