Skip to content

Commit

Permalink
Merge changes between r11913 and r11943 from ruby_1_8.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8_6@11944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
knu committed Feb 28, 2007
1 parent 7d8b85d commit dcbc5ce
Show file tree
Hide file tree
Showing 13 changed files with 214 additions and 18 deletions.
34 changes: 34 additions & 0 deletions ChangeLog
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,37 @@
Wed Feb 28 22:10:55 2007 Akinori MUSHA <knu@iDaemons.org>

* doc/NEWS-1.8.0: Rename NEWS to NEWS-1.8.0. This is way too old
NEWS.

* NEWS: Add NEWS, a document file to keep user visible feature
changes between releases.

* configure.in (ac_cv_func_fcntl): fcntl support for MinGW.

* missing/flock.c: workaround for MinGW.

* ext/openssl/extconf.rb: no need to check unistd.h and sys/time.h.
they are already checked at configure.
reported by KOBAYASHI Yasuhiro [ruby-list:43225]

* lib/mkmf.rb ($DEFLIBPATH): default library paths ($(topdir), etc)
should be the first elements of library paths list.
reported by KOBAYASHI Yasuhiro [ruby-list:43225]

* test/{dbm,gdbm}/test_{dbm,gdbm}.rb: shouldn't use host_os. use
target_os instead. reported by KOBAYASHI Yasuhiro [ruby-list:43225]

* mkconfig.rb (RbConfig): add CONFIG['PATCHLEVEL']

* common.mk: new target dist

* distruby.rb: new file

* configure.in (--enable-auto-image-base): avoid the neccessity to
rebase the shared libs as much as possible;
submitted by Corinna Vinschen <spam at vinschen.de> in
[ruby-talk:240964].

Wed Feb 28 20:51:32 2007 URABE Shyouhei <shyouhei@ruby-lang.org> Wed Feb 28 20:51:32 2007 URABE Shyouhei <shyouhei@ruby-lang.org>


* pack.c (pack_unpack): properly ignore non-base64 octets such as * pack.c (pack_unpack): properly ignore non-base64 octets such as
Expand Down
108 changes: 108 additions & 0 deletions NEWS
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,108 @@
= NEWS

This document is a list of user visible feature changes made between
releases excluding bug fixes.

Note that each entry is kept so brief that no reason behind or
reference information is supplied with. For a full list of changes
with all sufficient information, see the ChangeLog file.

== Changes with Ruby 1.8.5

=== New platforms/build tools support

* IA64 HP-UX

* Visual C++ 8 SP1

* autoconf 2.6x

=== Library updates (outstanding ones only)

* date

* Updated based on date2 4.0.3.

* digest

* New internal APIs for C and Ruby.

* Support for autoloading.

* See below for new features and compatibility issues.

* nkf

* Updated based on nkf as of 2007-01-28.

* tk

=== New methods and features

* builtin classes

* New method: Kernel#instance_variable_defined?

* New method: Module#class_variable_defined?

* New feature: Dir::glob() can now take an array of glob patterns.

* digest

* New digest class methods: file

* New digest instance methods: clone, reset, new,
inspect, digest_length (alias size or length),
block_length()

* New library: digest/bubblebabble

* New function: Digest(name)

* fileutils

* New option for FileUtils.cp_r(): :remove_destination

* thread

* Replaced with much faster mutex implementation in C.
The former implementation is available with a
configure option `--disable-fastthread'.

* webrick

* New method: WEBrick::Cookie.parse_set_cookies()

=== Compatibility issues (excluding feature bug fixes)

* builtin classes

* Time#to_s now returns a string in a form that
conforms to RFC2822.

# Before
"Wed Mar 03 12:34:56 JST 2007"
# After
"Wed, Mar 03 2007 12:34:56 +0900"

* fileutils

* A minor implementation change breaks Rake <=0.7.1.
Updating Rake to 0.7.2 fixes the problem.

* digest

* The constructor does no longer take an initial
string to feed; digest() and hexdigest() now do,
instead. The following examples show how to
migrate:

# Before
md = Digest::MD5.new("string")
# After (works with any version)
md = Digest::MD5.new.update("string")

# Before
hd = Digest::MD5.new("string").hexdigest
# After (works with any version)
hd = Digest::MD5.hexdigest("string")
5 changes: 4 additions & 1 deletion common.mk
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ $(RBCONFIG): $(srcdir)/mkconfig.rb config.status $(PREP)


.PRECIOUS: $(MKFILES) .PRECIOUS: $(MKFILES)


.PHONY: test install install-nodoc install-doc .PHONY: test install install-nodoc install-doc dist


PHONY: PHONY:


Expand Down Expand Up @@ -441,3 +441,6 @@ variable.$(OBJEXT): {$(VPATH)}variable.c {$(VPATH)}ruby.h config.h \
version.$(OBJEXT): {$(VPATH)}version.c {$(VPATH)}ruby.h config.h \ version.$(OBJEXT): {$(VPATH)}version.c {$(VPATH)}ruby.h config.h \
{$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \ {$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \
{$(VPATH)}version.h {$(VPATH)}version.h

dist: $(PROGRAM)
$(RUNRUBY) $(srcdir)/distruby.rb
3 changes: 2 additions & 1 deletion configure.in
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ mingw*) if test "$with_winsock2" = yes; then
rb_cv_binary_elf=no rb_cv_binary_elf=no
rb_cv_negative_time_t=no rb_cv_negative_time_t=no
enable_pthread=no enable_pthread=no
ac_cv_func_fcntl=yes
;; ;;
os2-emx*) LIBS="-lm $LIBS" os2-emx*) LIBS="-lm $LIBS"
ac_cv_lib_dir_opendir=no;; ac_cv_lib_dir_opendir=no;;
Expand Down Expand Up @@ -1089,7 +1090,7 @@ if test "$with_dln_a_out" != yes; then
rb_cv_dlopen=yes;; rb_cv_dlopen=yes;;
cygwin*|mingw*) : ${LDSHARED="${CC} -shared -s"} cygwin*|mingw*) : ${LDSHARED="${CC} -shared -s"}
XLDFLAGS="$XLDFLAGS -Wl,--stack,0x02000000" XLDFLAGS="$XLDFLAGS -Wl,--stack,0x02000000"
DLDFLAGS="${DLDFLAGS} -Wl,--enable-auto-import,--export-all" DLDFLAGS="${DLDFLAGS} -Wl,--enable-auto-image-base,--enable-auto-import,--export-all"
: ${LIBPATHENV=""} : ${LIBPATHENV=""}
rb_cv_dlopen=yes ;; rb_cv_dlopen=yes ;;
hiuxmpp) : ${LDSHARED='ld -r'} ;; hiuxmpp) : ${LDSHARED='ld -r'} ;;
Expand Down
49 changes: 49 additions & 0 deletions distruby.rb
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,49 @@
#!./miniruby

if RUBY_PATCHLEVEL.zero?
dirname = sprintf 'ruby-%s', RUBY_VERSION
tagname = dirname.gsub /ruby-(\d)\.(\d)\.(\d)/, 'v\1_\2_\3'
else
dirname = sprintf 'ruby-%s-p%u', RUBY_VERSION, RUBY_PATCHLEVEL
tagname = dirname.gsub /ruby-(\d)\.(\d)\.(\d)-p/, 'v\1_\2_\3_'
end
tarname = dirname + '.tar.gz'
repos = 'http://svn.ruby-lang.org/repos/ruby/tags/' + tagname

STDERR.puts 'exporting sources...'
system 'svn', 'export', '-q', repos, dirname
Dir.chdir dirname do
STDERR.puts 'generating configure...'
system 'autoconf'
system 'rm', '-rf', 'autom4te.cache'

STDERR.puts 'generating parse.c...'
system 'bison', '-y', '-o', 'parse.c', 'parse.y'
end

STDERR.puts 'generating tarball...'
system 'tar', 'chofzp', tarname, dirname

open tarname, 'rb' do |fp|
require 'digest/md5'
require 'digest/sha1'
str = fp.read
md5 = Digest::MD5.hexdigest str
sha = Digest::SHA1.hexdigest str
printf "MD5(%s)= %s\nSHA1(%s)= %s\n", tarname, md5, tarname, sha
end



#
# Local Variables:
# mode: ruby
# code: utf-8
# indent-tabs-mode: t
# tab-width: 3
# ruby-indent-level: 3
# fill-column: 79
# default-justification: full
# End:
# vi: ts=3 sw=3

File renamed without changes.
2 changes: 0 additions & 2 deletions ext/openssl/extconf.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
message "=== Checking for system dependent stuff... ===\n" message "=== Checking for system dependent stuff... ===\n"
have_library("nsl", "t_open") have_library("nsl", "t_open")
have_library("socket", "socket") have_library("socket", "socket")
have_header("unistd.h")
have_header("sys/time.h")
have_header("assert.h") have_header("assert.h")


message "=== Checking for required stuff... ===\n" message "=== Checking for required stuff... ===\n"
Expand Down
11 changes: 6 additions & 5 deletions lib/mkmf.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def try_do(src, command, &b)
log_src(src) log_src(src)
end end


def link_command(ldflags, opt="", libpath=$LIBPATH) def link_command(ldflags, opt="", libpath=$DEFLIBPATH|$LIBPATH)
Config::expand(TRY_LINK.dup, Config::expand(TRY_LINK.dup,
CONFIG.merge('hdrdir' => $hdrdir.quote, CONFIG.merge('hdrdir' => $hdrdir.quote,
'src' => CONFTEST_C, 'src' => CONFTEST_C,
Expand All @@ -289,7 +289,7 @@ def cpp_command(outfile, opt="")
CONFIG.merge('hdrdir' => $hdrdir.quote, 'srcdir' => $srcdir.quote)) CONFIG.merge('hdrdir' => $hdrdir.quote, 'srcdir' => $srcdir.quote))
end end


def libpathflag(libpath=$LIBPATH) def libpathflag(libpath=$DEFLIBPATH|$LIBPATH)
libpath.map{|x| libpath.map{|x|
(x == "$(topdir)" ? LIBPATHFLAG : LIBPATHFLAG+RPATHFLAG) % x.quote (x == "$(topdir)" ? LIBPATHFLAG : LIBPATHFLAG+RPATHFLAG) % x.quote
}.join }.join
Expand Down Expand Up @@ -1142,7 +1142,7 @@ def dummy_makefile(srcdir)
# #
def create_makefile(target, srcprefix = nil) def create_makefile(target, srcprefix = nil)
$target = target $target = target
libpath = $LIBPATH libpath = $DEFLIBPATH|$LIBPATH
message "creating Makefile\n" message "creating Makefile\n"
rm_f "conftest*" rm_f "conftest*"
if CONFIG["DLEXT"] == $OBJEXT if CONFIG["DLEXT"] == $OBJEXT
Expand Down Expand Up @@ -1204,7 +1204,7 @@ def create_makefile(target, srcprefix = nil)
mfile = open("Makefile", "wb") mfile = open("Makefile", "wb")
mfile.print configuration(srcprefix) mfile.print configuration(srcprefix)
mfile.print " mfile.print "
libpath = #{$LIBPATH.join(" ")} libpath = #{($DEFLIBPATH|$LIBPATH).join(" ")}
LIBPATH = #{libpath} LIBPATH = #{libpath}
DEFFILE = #{deffile} DEFFILE = #{deffile}
Expand Down Expand Up @@ -1424,7 +1424,8 @@ def init_mkmf(config = CONFIG)
$LIBRUBYARG = "" $LIBRUBYARG = ""
$LIBRUBYARG_STATIC = config['LIBRUBYARG_STATIC'] $LIBRUBYARG_STATIC = config['LIBRUBYARG_STATIC']
$LIBRUBYARG_SHARED = config['LIBRUBYARG_SHARED'] $LIBRUBYARG_SHARED = config['LIBRUBYARG_SHARED']
$LIBPATH = $extmk ? ["$(topdir)"] : CROSS_COMPILING ? [] : ["$(libdir)"] $DEFLIBPATH = $extmk ? ["$(topdir)"] : CROSS_COMPILING ? [] : ["$(libdir)"]
$LIBPATH = []
$INSTALLFILES = nil $INSTALLFILES = nil


$objs = nil $objs = nil
Expand Down
5 changes: 3 additions & 2 deletions missing/flock.c
Original file line number Original file line Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "config.h" #include "config.h"


#if defined HAVE_FCNTL && defined HAVE_FCNTL_H #if defined _WIN32
#elif defined HAVE_FCNTL && defined HAVE_FCNTL_H


/* These are the flock() constants. Since this sytems doesn't have /* These are the flock() constants. Since this sytems doesn't have
flock(), the values of the constants are probably not available. flock(), the values of the constants are probably not available.
Expand Down Expand Up @@ -122,7 +123,7 @@ flock(fd, operation)
return -1; return -1;
} }
} }
#elif !defined _WIN32 #else
int int
flock(fd, operation) flock(fd, operation)
int fd; int fd;
Expand Down
1 change: 1 addition & 0 deletions mkconfig.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ module Config
print " CONFIG[\"MINOR\"] = \"" + $2 + "\"\n" print " CONFIG[\"MINOR\"] = \"" + $2 + "\"\n"
print " CONFIG[\"TEENY\"] = \"" + $3 + "\"\n" print " CONFIG[\"TEENY\"] = \"" + $3 + "\"\n"
} }
print " CONFIG[\"PATCHLEVEL\"] = \"" + RUBY_PATCHLEVEL + "\"\n"
end end


dest = drive ? /= \"(?!\$[\(\{])(?:[a-z]:)?/i : /= \"(?!\$[\(\{])/ dest = drive ? /= \"(?!\$[\(\{])(?:[a-z]:)?/i : /= \"(?!\$[\(\{])/
Expand Down
4 changes: 2 additions & 2 deletions test/dbm/test_dbm.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
class TestDBM < Test::Unit::TestCase class TestDBM < Test::Unit::TestCase
def TestDBM.uname_s def TestDBM.uname_s
require 'rbconfig' require 'rbconfig'
case Config::CONFIG['host_os'] case Config::CONFIG['target_os']
when 'cygwin' when 'cygwin'
require 'Win32API' require 'Win32API'
uname = Win32API.new('cygwin1', 'uname', 'P', 'I') uname = Win32API.new('cygwin1', 'uname', 'P', 'I')
Expand All @@ -21,7 +21,7 @@ def TestDBM.uname_s


utsname.unpack('A20' * 5)[0] utsname.unpack('A20' * 5)[0]
else else
Config::CONFIG['host_os'] Config::CONFIG['target_os']
end end
end end
SYSTEM = uname_s SYSTEM = uname_s
Expand Down
4 changes: 2 additions & 2 deletions test/gdbm/test_gdbm.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
class TestGDBM < Test::Unit::TestCase class TestGDBM < Test::Unit::TestCase
def TestGDBM.uname_s def TestGDBM.uname_s
require 'rbconfig' require 'rbconfig'
case Config::CONFIG['host_os'] case Config::CONFIG['target_os']
when 'cygwin' when 'cygwin'
require 'Win32API' require 'Win32API'
uname = Win32API.new('cygwin1', 'uname', 'P', 'I') uname = Win32API.new('cygwin1', 'uname', 'P', 'I')
Expand All @@ -21,7 +21,7 @@ def TestGDBM.uname_s


utsname.unpack('A20' * 5)[0] utsname.unpack('A20' * 5)[0]
else else
Config::CONFIG['host_os'] Config::CONFIG['target_os']
end end
end end
SYSTEM = uname_s SYSTEM = uname_s
Expand Down
6 changes: 3 additions & 3 deletions version.h
Original file line number Original file line Diff line number Diff line change
@@ -1,15 +1,15 @@
#define RUBY_VERSION "1.8.6" #define RUBY_VERSION "1.8.6"
#define RUBY_RELEASE_DATE "2007-02-27" #define RUBY_RELEASE_DATE "2007-02-28"
#define RUBY_VERSION_CODE 186 #define RUBY_VERSION_CODE 186
#define RUBY_RELEASE_CODE 20070227 #define RUBY_RELEASE_CODE 20070228
#define RUBY_PATCHLEVEL 0 #define RUBY_PATCHLEVEL 0


#define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8 #define RUBY_VERSION_MINOR 8
#define RUBY_VERSION_TEENY 6 #define RUBY_VERSION_TEENY 6
#define RUBY_RELEASE_YEAR 2007 #define RUBY_RELEASE_YEAR 2007
#define RUBY_RELEASE_MONTH 2 #define RUBY_RELEASE_MONTH 2
#define RUBY_RELEASE_DAY 27 #define RUBY_RELEASE_DAY 28


RUBY_EXTERN const char ruby_version[]; RUBY_EXTERN const char ruby_version[];
RUBY_EXTERN const char ruby_release_date[]; RUBY_EXTERN const char ruby_release_date[];
Expand Down

0 comments on commit dcbc5ce

Please sign in to comment.