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

* configure.in: Improve OpenBSD support. [obtained from: OpenBSD

ports]

* dln.c (FUNCNAME_PATTERN): Ditto.

* ext/tcltklib/extconf.rb (find_tcl, find_tk): Look for both
  lib{tcl,tk}M.N and lib{tcl,tk}MN on all platforms.  *BSD have
  Tcl/Tk libraries named this way.

* ext/socket/addrinfo.h (NI_MAXHOST): Define NI_MAXHOST and
  NI_MAXHOST only if they are not defined yet.  This fixes build
  on such platforms as OpenBSD.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@3255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
knu 2002-12-31 11:24:49 +00:00
parent 0d27fe665b
commit 50f10d2a63
5 changed files with 37 additions and 30 deletions

View file

@ -1,3 +1,18 @@
Tue Dec 31 20:23:25 2002 Akinori MUSHA <knu@iDaemons.org>
* configure.in: Improve OpenBSD support. [obtained from: OpenBSD
ports]
* dln.c (FUNCNAME_PATTERN): Ditto.
* ext/tcltklib/extconf.rb (find_tcl, find_tk): Look for both
lib{tcl,tk}M.N and lib{tcl,tk}MN on all platforms. *BSD have
Tcl/Tk libraries named this way.
* ext/socket/addrinfo.h (NI_MAXHOST): Define NI_MAXHOST and
NI_MAXHOST only if they are not defined yet. This fixes build
on such platforms as OpenBSD.
Tue Dec 31 19:29:47 2002 Akinori MUSHA <knu@iDaemons.org>
* defines.h (FLUSH_REGISTER_WINDOWS): Add support for

View file

@ -514,7 +514,7 @@ case "$target_os" in
else
LDFLAGS="-rdynamic"
fi;;
netbsd*)
netbsd*|openbsd*)
if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
then
netbsd_elf=yes
@ -603,7 +603,10 @@ if test "$with_dln_a_out" != yes; then
LDFLAGS="-Wl,-export-dynamic"
fi
rb_cv_dlopen=yes ;;
openbsd*) LDSHARED="ld -Bforcearchive -Bshareable"
openbsd*) LDSHARED="\$(CC) -shared ${CCDLFLAGS}"
if test "$rb_cv_binary_elf" = yes; then
LDFLAGS="-Wl,-E"
fi
rb_cv_dlopen=yes ;;
bsdi3*) case "$CC" in
*shlicc*) LDSHARED="$CC -r"
@ -881,7 +884,8 @@ if test "$enable_shared" = 'yes'; then
;;
openbsd*)
SOLIBS='$(LIBS)'
;;
LIBRUBY_SO='lib$(RUBY_INSTALL_NAME).so.$(MAJOR).'`expr ${MINOR} \* 10 + ${TEENY}`
;;
solaris*)
XLDFLAGS='-R${prefix}/lib'
;;

2
dln.c
View file

@ -87,7 +87,7 @@ int eaccess();
#endif
#ifndef FUNCNAME_PATTERN
# if defined(__hp9000s300) || (defined(__NetBSD__) && !defined(__ELF__)) || defined(__BORLANDC__) || (defined(__FreeBSD__) && !defined(__ELF__)) || defined(__OpenBSD__) || defined(NeXT) || defined(__WATCOMC__) || defined(__APPLE__)
# if defined(__hp9000s300) || (defined(__NetBSD__) && !defined(__ELF__)) || defined(__BORLANDC__) || (defined(__FreeBSD__) && !defined(__ELF__)) || (defined(__OpenBSD__) && !defined(__ELF__)) || defined(NeXT) || defined(__WATCOMC__) || defined(__APPLE__)
# define FUNCNAME_PATTERN "_Init_%.200s"
# else
# define FUNCNAME_PATTERN "Init_%.200s"

View file

@ -115,8 +115,10 @@
/*
* Constants for getnameinfo()
*/
#ifndef NI_MAXHOST
#define NI_MAXHOST 1025
#define NI_MAXSERV 32
#endif
/*
* Flag values for getnameinfo()

View file

@ -22,20 +22,13 @@ def find_tcl(tcllib, stubs)
func = stubs ? "Tcl_InitStubs" : "Tcl_FindExecutable"
if tcllib
find_library(tcllib, func, *paths)
elsif RUBY_PLATFORM =~ /mswin32|mingw|cygwin/
find_library("tcl", func, *paths) or
find_library("tcl84", func, *paths) or
find_library("tcl83", func, *paths) or
find_library("tcl82", func, *paths) or
find_library("tcl80", func, *paths) or
find_library("tcl76", func, *paths)
elsif find_library("tcl", func, *paths)
# ok
else
find_library("tcl", func, *paths) or
find_library("tcl8.4", func, *paths) or
find_library("tcl8.3", func, *paths) or
find_library("tcl8.2", func, *paths) or
find_library("tcl8.0", func, *paths) or
find_library("tcl7.6", func, *paths)
%w[8.4 8.3 8.2 8.0 7.6].find { |ver|
find_library("tcl#{ver}", func, *paths) or
find_library("tcl#{ver.delete('.')}", func, *paths)
}
end
end
@ -44,20 +37,13 @@ def find_tk(tklib, stubs)
func = stubs ? "Tk_InitStubs" : "Tk_Init"
if tklib
find_library(tklib, func, *paths)
elsif RUBY_PLATFORM =~ /mswin32|mingw|cygwin/
find_library("tk", func, *paths) or
find_library("tk84", func, *paths) or
find_library("tk83", func, *paths) or
find_library("tk82", func, *paths) or
find_library("tk80", func, *paths) or
find_library("tk42", func, *paths)
elsif find_library("tk", func, *paths)
# ok
else
find_library("tk", func, *paths) or
find_library("tk8.4", func, *paths) or
find_library("tk8.3", func, *paths) or
find_library("tk8.2", func, *paths) or
find_library("tk8.0", func, *paths) or
find_library("tk4.2", func, *paths)
%w[8.4 8.3 8.2 8.0 4.2].find { |ver|
find_library("tk#{ver}", func, *paths) or
find_library("tk#{ver.delete('.')}", func, *paths)
}
end
end