Commit graph

135 commits

Author SHA1 Message Date
nobu
909f0b13b7 * dir.c (do_stat, do_lstat, do_opendir): should not warn ENOTDIR.
[ruby-talk:248288]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-24 00:33:09 +00:00
kou
840d741e0f * dir.c: fixed a typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-20 11:44:43 +00:00
tadf
da7c243387 just a minor change
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-19 17:13:51 +00:00
knu
557fc7374b * dir.c (glob_helper): Fix the function declaration.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-15 09:13:21 +00:00
knu
af44ff5ea8 * dir.c, win32/win32.c, win32/dir.h, ruby.h, intern.h: Bring
encoding aware globbing support in from trunk.  Dir.[] and
  Dir.glob() can now take many patterns in an array.  Minor fixes
  will follow.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-15 02:52:43 +00:00
nobu
d630684687 * dir.c (glob_helper): get rid of possible memory leak.
* win32/win32.c (cmdglob, rb_w32_cmdvector, rb_w32_opendir,
  rb_w32_get_environ): not to use GC before initialization.
  [ruby-core:09024]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-30 14:23:46 +00:00
nobu
6e2de67565 * dir.c (has_magic): glob names contain alphabets to enable case fold
search also for directories.  fixed: [ruby-talk:201917]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-14 16:27:51 +00:00
matz
7a5d128385 * dir.c (sys_warning): should not call a vararg function
rb_sys_warning() indirectly.  [ruby-core:07886]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-05-17 09:14:34 +00:00
matz
d58d7f4105 * dir.c (dir_close): should not close untainted dir stream.
* dir.c (GetDIR): add tainted/frozen check for each dir operation.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-05-16 00:43:41 +00:00
eban
a7e62dd16b * dir.c (glob_helper): do not use TRUE for djgpp.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-30 05:26:49 +00:00
nobu
14e256f4b1 * dir.c (ruby_glob): glob function not using ruby exception system.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-14 13:41:02 +00:00
matz
d981b18d05 * dir.c (dir_each): rewinddir(3) before iteration.
[ruby-talk:149628]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-27 02:10:56 +00:00
ocean
717b322958 fixed document system dependent (case sensitivity is 1.9 feature)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-16 06:25:38 +00:00
ocean
ac19de91a2 document improvement (backported from HEAD : Austin Ziegler's patch)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-16 06:02:19 +00:00
ocean
477187defd * dir.c, eval.c, hash.c, process.c, ruby.c: avoid warning "unused
variable" [ruby-dev:26387]

(patch from Kazuhiro NISHIYAMA)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-28 13:09:58 +00:00
nobu
a5f61654e9 * dir.c (glob_helper): get rid of using String. [ruby-dev:26180]
* dir.c (push_braces): should skip balanced braces.

* eval.c (ruby_options), win32/win32.c (NtInitialize): move argument
  intialization back.  [ruby-dev:26180]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-18 14:39:27 +00:00
eban
9d7f33e08b * dir.c, file.c (lstat): avoid warnings for mingw.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-11 13:30:10 +00:00
ocean
0fc986008e * {bcc32,win32,wince}/Makefile.sub: ri data was not installed
into correct path. [ruby-dev:26011]

* bcc32/Makefile.sub: defaulted install-nodoc. [ruby-dev:26011]

* dir.c: rdoc fix.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-11 03:20:17 +00:00
ocean
ca63c2c062 * dir.c (fnmatch): removed unnecessary code. (ruby_1_8 didn't have
String#clear, so [ruby-dev:24749] didn't affect it)

* win32/win32.c (NtInitialize): ditto. (by numeric.c 1.101.2.14)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-05 09:31:32 +00:00
matz
b90b86cab5 * dir.c (rb_push_glob): should work for NUL delimited patterns.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-21 08:01:20 +00:00
usa
525c8f80b2 * dir.c (dir_s_mkdir): win32 special processing doesn't need any
longer. (backported from CVS HEAD)

* win32/win32.[ch] (rb_w32_mkdir): new function. POSIX.1 compatible
  interface. (backported from CVS HEAD)

* win32/win32.[ch] (rb_w32_rmdir): new function. (backported from CVS
  HEAD)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-05 01:50:06 +00:00
matz
125514995c * dir.c (dir_open_dir): new function. [ruby-dev:25242]
* hash.c (Init_Hash): remove custom "hash" and "eql?".

* lib/set.rb (Set::eql): wrong definition.  [ruby-dev:25207]

* object.c (rb_obj_id_obsolete): warn always.

* eval.c (rb_enable_super): ditto.

* lib/set.rb (Set#==): [ruby-dev:25206]

* lib/pstore.rb (PStore#transaction): Use the empty content when a
  file is not found.  [ruby-dev:24561]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-18 02:07:31 +00:00
nobu
6e368fcc3c * dir.c (push_braces): do not reuse buffer strings. [ruby-core:03806]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-25 01:14:35 +00:00
matz
39080991ab * file.c (rb_file_chown): integer conversion should be prior to
GetOpenFile().  [ruby-dev:24947]

* file.c (rb_file_truncate): ditto.

* file.c (rb_file_s_truncate): ditto.

* dir.c (dir_seek): use NUM2OFFT().

* misc/ruby-mode.el (ruby-non-block-do-re): [ruby-core:03719]

* dir.c (dir_seek): should retrieve dir_data after NUM2INT().
  [ruby-dev:24941]

* string.c (rb_str_splice): should place index wrapping after
  possible modification.  [ruby-dev:24940]

* eval.c (error_print): nicer traceback at interrupt.
  [ruby-core:03774]

* string.c (str_gsub): internal buffer should not be listed by
  ObjectSpace.each_object() by String#gsub.  [ruby-dev:24931]

* lib/cgi/session.rb (CGI::Session::FileStore::initialize): raise
  exception if data corresponding to session specified from the
  client does not exist.

* string.c (str_gsub): internal buffer should not be listed by
  ObjectSpace.each_object().  [ruby-dev:24919]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-22 15:29:52 +00:00
nobu
0996725681 * dir.c (rb_globi): also should call back via rb_glob_caller().
[ruby-dev:24775]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-11 08:36:20 +00:00
matz
98101c1f96 * dir.c (push_braces): was confusing VALUE and char*.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-11 05:55:02 +00:00
matz
075e78b39b * dir.c (rb_push_glob): Dir.glob should have call its block.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-11 00:42:16 +00:00
matz
c5789b5075 * dir.c (rb_glob2): do not allocate buffer from heap to avoid
memory leaks.  use string object for buffering instead.
  [ruby-dev:24738]

* dir.c (join_path): ditto.

* io.c (io_read): external input buffer may be modified even after
  rb_str_locktmp().  [ruby-dev:24735]

* dir.c (fnmatch): p or s may be NULL.  [ruby-dev:24749]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-10 07:17:53 +00:00
matz
860bdc3b61 * io.c (read_all): block string buffer modification during
rb_io_fread() by freezing it temporarily. [ruby-dev:24479]

* dir.c (rb_push_glob): block call at once the end of method.
  [ruby-dev:24487]

* ext/enumerator/enumerator.c (enum_each_slice): remove
  rb_gc_force_recycle() to prevent potential SEGV.
  [ruby-dev:24499]

* ext/zlib/zlib.c (zstream_expand_buffer): hide internal string
  buffer by clearing klass.  [ruby-dev:24510]

* ext/socket/socket.c (sock_s_getservbyaname): protocol string
  might be altered.  [ruby-dev:24503]

* string.c (rb_str_upto): check if return value from succ is a
  string.  [ruby-dev:24504]

* io.c (rb_io_popen): get mode string via rb_io_flags_mode() to
  avoid mode string modification.  [ruby-dev:24454]

* io.c (rb_io_getline_fast): should take delim as unsigned char to
  distinguish EOF and '\377'.  [ruby-dev:24460]

* io.c (rb_io_getline): add check for RS modification.
  [ruby-dev:24461]

* enum.c (enum_sort_by): use qsort() directly instead using
  rb_iterate().  [ruby-dev:24462]

* enum.c (enum_each_with_index): remove rb_gc_force_recycle() to
  prevent access to recycled object (via continuation for
  example).  [ruby-dev:24463]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-19 10:25:23 +00:00
matz
ba19ba779c * array.c (rb_ary_uniq_bang): element size might change during
comparison.  [ruby-dev:24298]

* enum.c (enum_sort_by): do not use qsort directly.  use
  rb_ary_sort_bang() instead.  [ruby-dev:24291]

* enum.c (enum_sort_by): pedantic type check added.
  [ruby-dev:24291]

* hash.c (rb_hash_foreach_iter): check iter_lev after each
  iteration.  [ruby-dev:24289]

* array.c (rb_ary_and): element size might change during
  comparison.  [ruby-dev:24290]

* array.c (rb_ary_or): ditto. [ruby-dev:24292]

* array.c (rb_ary_equal): wrong fix. [ruby-dev:24286]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-21 09:35:29 +00:00
matz
de5a85496a * array.c (rb_ary_equal): element size might change during
comparison.  [ruby-dev:24254]

* array.c (rb_ary_diff): ditto. [ruby-dev:24274]

* array.c (rb_ary_select): ditto. [ruby-dev:24278]

* array.c (rb_ary_delete): ditto. [ruby-dev:24283]

* array.c (rb_ary_rindex): ditto. [ruby-dev:24275]

* array.c (rb_ary_initialize): element size might change during
  initializing block.  [ruby-dev:24284]

* dir.c (dir_s_chdir): avoid memory leak and unnecessary chdir to
  the original directory when exception has caused in changing
  direcotry or within block.  thanks to Johan Holmberg
  <holmberg@iar.se> [ruby-core:03446]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-18 06:56:38 +00:00
matz
0bb024a79f * dir.c: backout untested code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-08-20 00:46:39 +00:00
matz
182fdea924 * dir.c (free_dir): fix memory leak. reported by yamamoto
madoka.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-08-19 07:48:50 +00:00
knu
a91e86dd1f * dir.c (range): use NULL instead of 0.
* dir.c (range): get rid of a gcc 3.4 warning.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-17 18:24:15 +00:00
ocean
2bf168affc * dir.c (rb_glob2, rb_glob, push_globs, push_braces, rb_push_glob):
fix memory leak to occur when block is interrupted in Dir.glob.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-12 01:45:27 +00:00
ocean
a42f910d19 * dir.c (range): fix possible "\0" overrun. (in case of "\0-")
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-17 05:47:18 +00:00
ocean
f3615ecc42 * dir.c (range): Cancel previous change. More discussion is needed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-08 12:03:23 +00:00
ocean
44175158a2 * dir.c (range): treat incomplete '[' as ordinary character (like
has_magic does).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-08 06:32:40 +00:00
ocean
34a78f5670 * dir.c (glob_helper): '**/' should not match leading period
unless File::FNM_DOTMATCH is set. (like '*/')


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-24 10:03:08 +00:00
ocean
77077c0ffd * dir.c (rb_glob, rb_globi): add const.
* ruby.h: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-16 04:41:46 +00:00
ocean
e95d01cd78 * dir.c (fnmatch):
File.fnmatch('*?', 'a') should return true. [ruby-dev:22815]
  File.fnmatch('\[1\]' , '[1]') should return true. [ruby-dev:22819]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-09 04:04:59 +00:00
dave
5076ed519b Document Class and Dir
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-19 15:18:09 +00:00
nobu
77ffc8bf3f * dir.c (fnmatch): unlike find_dirsep(), rb_path_next() never
return NULL.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-18 07:38:48 +00:00
nobu
52f81e0ce7 commit miss
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-15 04:11:34 +00:00
nobu
12b5b81a97 * dir.c (check_dirname): check string safety and remove extraneous
trailing directory separators.  [ruby-dev:22279]

* file.c: extern rb_path_next, rb_path_skip_prefix,
  rb_path_last_separator, rb_path_end.

* intern.h: prototypes for rb_path_next, rb_path_skip_prefix,
  rb_path_last_separator, rb_path_end.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-15 04:07:03 +00:00
matz
6212cfb9c5 * gc.c (Init_stack): stack region is far smaller than usual if
pthread is used.

* marshal.c (w_extended): singleton methods should not be checked
  when dumping via marshal_dump() or _dump(). [ruby-talk:85909]

* file.c (getcwdofdrv): avoid using getcwd() directly, use
  my_getcwd() instead.

* merged NeXT, OpenStep, Rhapsody ports patch from Eric Sunshine
  <sunshine@sunshineco.com>.  [ruby-core:01596]

* marshal.c (w_object): LINK check earlier than anything else,
  i.e. do not dump TYPE_IVAR for already dumped objects.
  (ruby-bugs PR#1220)

* eval.c (rb_eval): call "inherited" only when a new class is
  generated; not on reopening.

* eval.c (eval): prepend error position in evaluating string to

* configure.in: revived NextStep, OpenStep, and Rhapsody ports which
  had become unbuildable; enhanced --enable-fat-binary option so that
  it accepts a list of desired architectures (rather than assuming a
  fixed list), or defaults to a platform-appropriate list if user does
  not provide an explicit list; made the default list of architectures
  for MAB (fat binary) more comprehensive; now uses -fno-common even
  when building the interpreter (in addition to using it for
  extensions), thus allowing the interpreter to be embedded into a
  plugin module of an external project (in addition to allowing
  embedding directly into an application); added checks for
  <netinet/in_systm.h> (needed by `socket' extension) and getcwd(); now
  ensures that -I/usr/local/include is employed when extensions'
  extconf.rb scripts invoke have_header() since extension checks on
  NextStep and OpenStep will fail without it if the desired resource
  resides in the /usr/local tree; fixed formatting of --help message.

* Makefile.in: $(LIBRUBY_A) rule now deletes the archive before
  invoking $(AR) since `ar' on Apple/NeXT can not "update" MAB archives
  (see configure's --enable-fat-binary option); added rule for new
  missing/getcwd.c.

* defines.h: fixed endian handling during MAB build (see configure's
  --enable-fat-binary option) to ensure that all portions of the
  project see the correct WORDS_BIGENDIAN value (some extension modules
  were getting the wrong endian setting); added missing constants
  GETPGRP_VOID, WNOHANG, WUNTRACED, X_OK, and type pid_t for NextStep
  and OpenStep; removed unnecessary and problematic HAVE_SYS_WAIT_H
  define in NeXT section.

* dir.c: do not allow NAMLEN() macro to trust dirent::d_namlen on
  NextStep since, on some installations, this value always resolves
  uselessly to zero.

* dln.c: added error reporting to NextStep extension loader since the
  previous behavior of failing silently was not useful; now ensures
  that NSLINKMODULE_OPTION_BINDNOW compatibility constant is defined
  for OpenStep and Rhapsody; no longer includes <mach-o/dyld.h> twice
  on Rhapsody since this header lacks multiple-include protection,
  which resulted in "redefinition" compilation errors.

* main.c: also create hard reference to objc_msgSend() on NeXT
  platforms (in addition to Apple platforms).

* lib/mkmf.rb: now exports XCFLAGS from configure script to extension
  makefiles so that extensions can be built MAB (see configure's
  --enable-fat-binary option); also utilize XCFLAGS in cc_command()
  (but not cpp_command() because MAB flags are incompatible with
  direct invocation of `cpp').

* ext/curses/extconf.rb: now additionally checks for presence of these
  curses functions which are not present on NextStep or Openstep:
  bkgd(), bkgdset(), color(), curs(), getbkgd(), init(), scrl(), set(),
  setscrreg(), wattroff(), wattron(), wattrset(), wbkgd(), wbkgdset(),
  wscrl(), wsetscrreg()

* ext/curses/curses.c: added appropriate #ifdef's for additional set of
  curses functions now checked by extconf.rb; fixed curses_bkgd() and
  window_bkgd() to correctly return boolean result rather than numeric
  result; fixed window_getbkgd() to correctly signal an error by
  returning nil rather than -1.

* ext/etc/etc.c: setup_passwd() and setup_group() now check for null
  pointers before invoking rb_tainted_str_new2() upon fields extracted
  from `struct passwd' and `struct group' since null pointers in some
  fields are common on NextStep/OpenStep (especially so for the
  `pw_comment' field) and rb_tainted_str_new2() throws an exception
  when it receives a null pointer.

* ext/pty/pty.c: include "util.h" for strdup()/ruby_strdup() for
  platforms such as NextStep and OpenStep which lack strdup().

* ext/socket/getaddrinfo.c: cast first argument of getservbyname(),
  gethostbyaddr(), and gethostbyname() from (const char*) to non-const
  (char*) for older platforms such as NextStep and OpenStep.

* ext/socket/socket.c: include "util.h" for strdup()/ruby_strdup() for
  platforms such as NextStep and OpenStep which lack strdup(); include
  <netinet/in_systm.h> if present for NextStep and OpenStep; cast first
  argument of gethostbyaddr() and getservbyname() from (const char*) to
  non-const (char*) for older platforms.

* ext/syslog/syslog.c: include "util.h" for strdup()/ruby_strdup() for
  platforms such as NextStep and OpenStep which lack strdup().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-22 04:00:03 +00:00
nobu
43e4a50015 * dir.c (glob_helper): preserve raw order for **.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-18 02:23:13 +00:00
nobu
69459d98ef * dir.c (find_dirsep): get rid of warnings.
* eval.c (error_print): temporary value might be disposed by GC.

* hash.c (env_has_value, env_index): should not increment NULL.

* io.c (io_read, rb_io_sysread): not read when length is 0.

* io.c (rb_io_reopen): ensure initialized IO.

* io.c (rb_io_init_copy): sychronize file pointer.

* io.c (rb_io_s_pipe): make exception proof.

* string.c (rb_str_rindex_m): Fixnum 0 matched end of string.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-23 08:41:07 +00:00
matz
9ac15a773d * dir.c (push_braces): do not push_braces() unless rbrace is found.
(ruby-bugs-ja:PR#469)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-19 15:54:37 +00:00
matz
d4db9e9c60 * io.c (rb_io_initialize): should check rb_secure(4).
* dir.c (dir_s_getwd): should check rb_secure(4).

* object.c (rb_obj_infect): function version of OBJ_INFECT().

* eval.c (rb_secure_update): new function to check object update.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-25 03:11:27 +00:00