diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-08-11 07:24:11 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-08-11 07:24:11 +0000 |
commit | c5fb7cf4fb7759ae020032f344460c2accef2bc7 (patch) | |
tree | 37621427e11c9e2bf672c05c25b24bf0d365a639 /ext | |
parent | b0faee9b9cd5a747e226a2c64f33588b2b8f4e6c (diff) |
1.3.8 to be, final beta (hopefully)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/Setup.nt | 2 | ||||
-rw-r--r-- | ext/extmk.rb.in | 14 | ||||
-rw-r--r-- | ext/fcntl/fcntl.c | 1 | ||||
-rw-r--r-- | ext/nkf/nkf.c | 4 | ||||
-rw-r--r-- | ext/socket/extconf.rb | 2 | ||||
-rw-r--r-- | ext/socket/getaddrinfo.c | 4 | ||||
-rw-r--r-- | ext/socket/getnameinfo.c | 4 | ||||
-rw-r--r-- | ext/tcltklib/tcltklib.c | 4 | ||||
-rw-r--r-- | ext/tk/tkutil.c | 1 |
9 files changed, 25 insertions, 11 deletions
diff --git a/ext/Setup.nt b/ext/Setup.nt index 4d9244ef6f..cd7969bb73 100644 --- a/ext/Setup.nt +++ b/ext/Setup.nt @@ -1,4 +1,4 @@ -option nodynamic +#option nodynamic #GD Win32API diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in index f4f8c8c50b..66f5e9267c 100644 --- a/ext/extmk.rb.in +++ b/ext/extmk.rb.in @@ -17,6 +17,8 @@ end SRC_EXT = ["c", "cc", "m", "cxx", "cpp", "C"] $extlist = [] +$includedir = "@includedir@".gsub(/\$\{prefix\}|\$\(prefix\)/,'@prefix@') + $cache_mod = false $lib_cache = {} $func_cache = {} @@ -67,8 +69,8 @@ if RUBY_PLATFORM == "m68k-human" else CFLAGS = "@CFLAGS@" end -LINK = "@CC@ -o conftest -I#$topdir -I#$top_srcdir #{CFLAGS} -I@includedir@ @LDFLAGS@ %s %s conftest.c %s %s @LIBS@" -CPP = "@CPP@ @CPPFLAGS@ -I#$topdir -I#$top_srcdir #{CFLAGS} -I@includedir@ %s %s conftest.c" +LINK = "@CC@ -o conftest -I#$topdir -I#$top_srcdir #{CFLAGS} -I#$includedir @LDFLAGS@ %s %s conftest.c %s %s @LIBS@" +CPP = "@CPP@ @CPPFLAGS@ -I#$topdir -I#$top_srcdir #{CFLAGS} -I#$includedir %s %s conftest.c" if /cygwin|mswin32|djgpp|mingw32|m68k-human|i386-os2_emx/i =~ RUBY_PLATFORM $null = open("nul", "w") @@ -80,6 +82,7 @@ $orgerr = $stderr.dup $orgout = $stdout.dup def xsystem command if $DEBUG + puts command return system(command) end $stderr.reopen($null) @@ -378,7 +381,7 @@ def create_makefile(target) if "@DLEXT@" == $OBJEXT libs = $libs.split for lib in libs - lib.sub!(/-l(.*)/, '"lib\1.#{$LIBEXT}"') + lib.sub!(/-l(.*)/, %%"lib\\1.#{$LIBEXT}"%) end $defs.push(format("-DEXTLIB='%s'", libs.join(","))) end @@ -687,7 +690,10 @@ if $cache_mod f.close end -exit if $install or $clean +if $install or $clean + Dir.chdir ".." + exit +end $extinit = "" unless $extinit ruby = "@RUBY_INSTALL_NAME@@EXEEXT@" diff --git a/ext/fcntl/fcntl.c b/ext/fcntl/fcntl.c index 186f9ac893..80e0112e4c 100644 --- a/ext/fcntl/fcntl.c +++ b/ext/fcntl/fcntl.c @@ -34,6 +34,7 @@ pack up your own arguments to pass as args for locking functions, etc. #include "ruby.h" #include <fcntl.h> +void Init_fcntl() { VALUE mFcntl = rb_define_module("Fcntl"); diff --git a/ext/nkf/nkf.c b/ext/nkf/nkf.c index aa38bada7f..f275e28797 100644 --- a/ext/nkf/nkf.c +++ b/ext/nkf/nkf.c @@ -133,9 +133,9 @@ rb_nkf_guess(obj, src) if (*p == '\033') { return INT2FIX(_JIS); } - if ('\000' < *p && *p < '\006' + if ('\000' <= *p && *p < '\006' || *p == 0x7f - || *p == 0xdf) { + || *p == 0xff) { return INT2FIX(_BINARY); } if (0x81 <= *p && *p <= 0x8d) { diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb index 362679389f..da1a2a6b05 100644 --- a/ext/socket/extconf.rb +++ b/ext/socket/extconf.rb @@ -259,6 +259,8 @@ else $objs += ["getnameinfo.#{$OBJEXT}"] have_func("inet_ntop") or have_func("inet_ntoa") have_func("inet_pton") or have_func("inet_aton") + have_header("arpa/nameser.h") + have_header("resolv.h") end have_header("sys/un.h") diff --git a/ext/socket/getaddrinfo.c b/ext/socket/getaddrinfo.c index d09d726516..c71a56ca80 100644 --- a/ext/socket/getaddrinfo.c +++ b/ext/socket/getaddrinfo.c @@ -49,9 +49,13 @@ #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> +#if defined(HAVE_ARPA_NAMESER_H) #include <arpa/nameser.h> +#endif #include <netdb.h> +#if defined(HAVE_RESOLV_H) #include <resolv.h> +#endif #include <unistd.h> #else #include <winsock2.h> diff --git a/ext/socket/getnameinfo.c b/ext/socket/getnameinfo.c index fbb39e059e..abadd8f442 100644 --- a/ext/socket/getnameinfo.c +++ b/ext/socket/getnameinfo.c @@ -39,10 +39,14 @@ #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> +#if defined(HAVE_ARPA_NAMESER_H) #include <arpa/nameser.h> +#endif #include <netdb.h> +#if defined(HAVE_RESOLV_H) #include <resolv.h> #endif +#endif #ifdef NT #include <winsock2.h> #include <stdio.h> diff --git a/ext/tcltklib/tcltklib.c b/ext/tcltklib/tcltklib.c index b1dae089db..314246869e 100644 --- a/ext/tcltklib/tcltklib.c +++ b/ext/tcltklib/tcltklib.c @@ -4,10 +4,6 @@ * Oct. 24, 1997 Y. Matsumoto */ -#if defined(NT) -# include <windows.h> -#endif - #include <stdio.h> #include <string.h> #include <tcl.h> diff --git a/ext/tk/tkutil.c b/ext/tk/tkutil.c index efa3fd735d..9d4ca0a9d0 100644 --- a/ext/tk/tkutil.c +++ b/ext/tk/tkutil.c @@ -33,6 +33,7 @@ tk_s_new(argc, argv, klass) return obj; } +void Init_tkutil() { VALUE mTK = rb_define_module("TkUtil"); |