mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* configure.in (rb_cv_noreturn): default for platforms not support
prototypes. * ruby.c (ruby_init_loadpath): buffer for path name should have MAXPATHLEN. * lib/mkmf.rb (configuration): include topdir and hdrdir in VPATH. * lib/mkmf.rb (create_makefile): default dependency rule. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0d8a0904d9
commit
21410f4dfe
4 changed files with 35 additions and 10 deletions
16
ChangeLog
16
ChangeLog
|
@ -1,9 +1,21 @@
|
|||
Fri Mar 12 20:19:16 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* configure.in (rb_cv_noreturn): default for platforms not support
|
||||
prototypes.
|
||||
|
||||
* ruby.c (ruby_init_loadpath): buffer for path name should have
|
||||
MAXPATHLEN.
|
||||
|
||||
* lib/mkmf.rb (configuration): include topdir and hdrdir in VPATH.
|
||||
|
||||
* lib/mkmf.rb (create_makefile): default dependency rule.
|
||||
|
||||
Fri Mar 12 07:35:36 2004 GOTOU Yuuzou <gotoyuzo@notwork.org>
|
||||
|
||||
* lib/webrick/config.rb (WEBrick::Config::General): add
|
||||
:DoNotReverseLookup.
|
||||
|
||||
* lib/webrick/server.rb (WEBrick::GenericServer#accept): call
|
||||
* lib/webrick/server.rb (WEBrick::GenericServer#accept): call
|
||||
do_not_reverse_lookup for each socket if :DoNotReverseLookup
|
||||
is set. [ruby-code:02357]
|
||||
|
||||
|
@ -95,7 +107,7 @@ Mon Mar 8 01:05:55 2004 GOTOU Yuuzou <gotoyuzo@notwork.org>
|
|||
* lib/webrick/httpserver.rb (WEBrick::HTTPServer#run): should print
|
||||
error message for WEBrick::HTTPSataus::Error.
|
||||
|
||||
* lib/webrick/httpserver.rb (WEBrick::HTTPServer#lookup_server):
|
||||
* lib/webrick/httpserver.rb (WEBrick::HTTPServer#lookup_server):
|
||||
lookup for hostname from :ServerAlias if the req.host is not match
|
||||
to :ServerName.
|
||||
|
||||
|
|
|
@ -246,7 +246,7 @@ if test "$rb_cv_stdarg" = yes; then
|
|||
fi
|
||||
|
||||
AC_CACHE_CHECK([for noreturn], rb_cv_noreturn,
|
||||
[rb_cv_noreturn=no
|
||||
[rb_cv_noreturn=x
|
||||
for mac in "x __attribute__ ((noreturn))" "__declspec(noreturn) x" x; do
|
||||
AC_TRY_COMPILE(
|
||||
[#define NORETURN(x) $mac
|
||||
|
|
|
@ -727,6 +727,10 @@ end
|
|||
|
||||
def configuration(srcdir)
|
||||
mk = []
|
||||
vpath = %w[$(srcdir) $(topdir) $(hdrdir)]
|
||||
if $mingw && CONFIG['build_os'] == 'cygwin'
|
||||
vpath.each {|p| p.sub!(/.*/, '$(shell cygpath -u \&)')}
|
||||
end
|
||||
mk << %{
|
||||
SHELL = /bin/sh
|
||||
|
||||
|
@ -735,7 +739,7 @@ SHELL = /bin/sh
|
|||
srcdir = #{srcdir}
|
||||
topdir = #{$topdir}
|
||||
hdrdir = #{$hdrdir}
|
||||
VPATH = #{$mingw && CONFIG['build_os'] == 'cygwin' ? '$(shell cygpath -u $(srcdir))' : '$(srcdir)'}
|
||||
VPATH = #{vpath.join(File::PATH_SEPARATOR)}
|
||||
}
|
||||
drive = File::PATH_SEPARATOR == ';' ? /\A\w:/ : /\A/
|
||||
if destdir = CONFIG["prefix"].scan(drive)[0] and !destdir.empty?
|
||||
|
@ -982,6 +986,9 @@ site-install-rb: install-rb
|
|||
mfile.print line
|
||||
end
|
||||
end
|
||||
else
|
||||
vpath = ($nmake ? "{$(hdrdir)}" : "")
|
||||
mfile.print "$(OBJS): #{vpath}ruby.h #{vpath}defines.h #{$config_h}\n"
|
||||
end
|
||||
ensure
|
||||
mfile.close if mfile
|
||||
|
|
18
ruby.c
18
ruby.c
|
@ -33,6 +33,12 @@
|
|||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
# include <sys/param.h>
|
||||
#endif
|
||||
#ifndef MAXPATHLEN
|
||||
# define MAXPATHLEN 1024
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRING_H
|
||||
char *strchr _((const char*,const char));
|
||||
|
@ -236,7 +242,7 @@ void
|
|||
ruby_init_loadpath()
|
||||
{
|
||||
#if defined LOAD_RELATIVE
|
||||
char libpath[FILENAME_MAX+1];
|
||||
char libpath[MAXPATHLEN+1];
|
||||
char *p;
|
||||
int rest;
|
||||
#if defined _WIN32 || defined __CYGWIN__
|
||||
|
@ -251,15 +257,15 @@ ruby_init_loadpath()
|
|||
GetModuleFileName(libruby, libpath, sizeof libpath);
|
||||
#elif defined(DJGPP)
|
||||
extern char *__dos_argv0;
|
||||
strncpy(libpath, __dos_argv0, FILENAME_MAX);
|
||||
strncpy(libpath, __dos_argv0, sizeof(libpath) - 1);
|
||||
#elif defined(__human68k__)
|
||||
extern char **_argv;
|
||||
strncpy(libpath, _argv[0], FILENAME_MAX);
|
||||
strncpy(libpath, _argv[0], sizeof(libpath) - 1);
|
||||
#elif defined(__EMX__)
|
||||
_execname(libpath, FILENAME_MAX);
|
||||
_execname(libpath, sizeof(libpath) - 1);
|
||||
#endif
|
||||
|
||||
libpath[FILENAME_MAX] = '\0';
|
||||
libpath[sizeof(libpath) - 1] = '\0';
|
||||
#if defined DOSISH || defined __CYGWIN__
|
||||
translate_char(libpath, '\\', '/');
|
||||
#endif
|
||||
|
@ -276,7 +282,7 @@ ruby_init_loadpath()
|
|||
p = libpath + 1;
|
||||
}
|
||||
|
||||
rest = FILENAME_MAX - (p - libpath);
|
||||
rest = sizeof(libpath) - 1 - (p - libpath);
|
||||
|
||||
#define RUBY_RELATIVE(path) (strncpy(p, (path), rest), libpath)
|
||||
#else
|
||||
|
|
Loading…
Add table
Reference in a new issue