Граф коммитов

73 Коммитов

Автор SHA1 Сообщение Дата
nobu 88d6c083ea * ext/extmk.rb, lib/fileutils.rb, lib/mkmf.rb, lib/optparse.rb,
lib/shellwords.rb: get rid of shadowing outer local variable.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-09 14:41:24 +00:00
matz 803591e900 * string.c (sym_eql): fail early to gain performance.
* string.c (sym_hash): cache hash value in aux.shared if possible.

* gc.c (rb_obj_id): no need to treat symbols specially.

* lib/fileutils.rb (FileUtils::FileUtils): singleton_methods() no
  longer return an array of strings, but of symbols.

* lib/delegate.rb (DelegateClass): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-20 04:18:25 +00:00
aamine 16b6d69f63 * lib/fileutils.rb: do not repeat command options.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-03-05 09:41:33 +00:00
akr 192fcacebf * lib/fileutils.rb (FileUtils.cp_r): implement :remove_destination
option.

* ext/extmk.rb: use :remove_destination to install extension libraries
  to avoid SEGV.
  [ruby-dev:28417]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-03-03 12:24:53 +00:00
aamine 3efb9e43b6 * lib/fileutils.rb (mv): should remove file after copying. [ruby-dev:28223]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-01-19 13:22:13 +00:00
matz 9ad68774c1 * lib/fileutils.rb (FileUtils::ln): ln documentation fix.
[ruby-core:06661]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-19 11:42:51 +00:00
aamine 8a6eb889e0 * lib/fileutils.rb (cd): no longer accept :noop option, related code is useless. [ruby-core:05858] [ruby-Bugs:2494]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-23 23:54:57 +00:00
aamine a33aa9c9f4 * lib/fileutils.rb: fix visibility of FileUtils::NoWrite, Verbose, DryRun. [ruby-core:05954]
* test/fileutils/test_nowrite.rb: test it.
* test/fileutils/test_dryrun.rb: new file.
* test/fileutils/test_verbose.rb: new file.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-23 23:30:09 +00:00
aamine 8885a8720d * lib/fileutils.rb: method renaming: collect_methods -> collect_method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-18 21:38:40 +00:00
aamine b7083f661d * lib/fileutils.rb: use module_function instead of single extend.
* test/fileutils/test_fileutils.rb: test existence of singleton methods.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-18 20:59:29 +00:00
aamine 14d206dbb5 * lib/fileutils.rb (remove_entry_secure): does not use chdir(2).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-18 20:33:01 +00:00
aamine 8e5e94d2f3 doc fix
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-13 13:17:23 +00:00
aamine 8ce9641fb8 * lib/fileutils.rb (remove_entry_secure): forgot final chdir.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-13 13:14:07 +00:00
aamine bacd0dddd1 * lib/fileutils.rb (remove_entry_secure): uses chdir(2) and check if current directory is correct. [ruby-dev:26100] [ruby-dev:26226]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-13 13:06:04 +00:00
aamine bff7359065 * lib/fileutils.rb (cd): follow :noop option change. (This patch is contributed by Doug Kearns)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-27 10:12:08 +00:00
aamine 98855e4a27 * lib/fileutils.rb (remove_entry_secure): add documentation.
* lib/fileutils.rb (remove_entry_secure): should not invoke unlink(2) against a directory.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-26 11:33:16 +00:00
aamine 55ec2ad163 * lib/fileutils.rb (rm_r): use lchown(2), not chown(2). [ruby-dev:26226]
* lib/fileutils.rb (cd): remove :noop option. (FEATURE CHANGE)
* lib/fileutils.rb (cp_r): should copy symlink as symlink, for also tree root. (FEATURE CHANGE)
* lib/fileutils.rb (cp_r): new option :dereference_root.
* lib/fileutils.rb: new method remove_entry.
* lib/fileutils.rb: new method remove_entry_secure.
* lib/fileutils.rb: add documentation.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-25 22:41:32 +00:00
aamine ac5925d2ab * lib/fileutils.rb (rm_r): does chown(2). [ruby-dev:26199]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-25 10:50:14 +00:00
aamine 57873ba60f * lib/fileutils.rb (rm_r): new option :secure (default = true).
* lib/fileutils.rb (remove_file, remove_dir): try chmod(700) only on Windows.
* lib/fileutils.rb: does not depend on find.rb.
* lib/fileutils.rb: new method chmod_R.
* lib/fileutils.rb (chown_R): did not work.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-21 17:40:24 +00:00
aamine af759b81a1 * lib/fileutils.rb (remove_file): ignore exceptions caused by chmod.
* lib/fileutils.rb (remove_dir): try to get rights to rmdir. [ruby-Bugs:1502]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-14 10:00:52 +00:00
aamine 5bd2b12dae * lib/fileutils.rb (remove_file): ignore Errno::E* if force option is set. [ruby-dev:25944]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-26 15:57:16 +00:00
matz 70bbad3cfd * array.c: replace rb_protect_inspect() and rb_inspecting_p() by
rb_exec_recursive() in eval.c.

* eval.c (rb_exec_recursive): new function.

* array.c (rb_ary_join): use rb_exec_recursive().

* array.c (rb_ary_inspect, rb_ary_hash): ditto.

* file.c (rb_file_join): ditto.

* hash.c (rb_hash_inspect, rb_hash_to_s, rb_hash_hash): ditto.

* io.c (rb_io_puts): ditto.

* object.c (rb_obj_inspect): ditto

* struct.c (rb_struct_inspect): ditto.

* lib/set.rb (SortedSet::setup): a hack to shut up warning.
  [ruby-talk:132866]

* lib/time.rb (Time::strptime): add new function.  inspired by
  [ruby-talk:132815].

* lib/parsedate.rb (ParseDate::strptime): ditto.

* regparse.c: move st_*_strend() functions from st.c.  fixed some
  potential memory leaks.

* exception error messages updated.  [ruby-core:04497]

* ext/socket/socket.c (Init_socket): add bunch of Socket
  constants.  Patch from Sam Roberts <sroberts@uniserve.com>.
  [ruby-core:04409]

* array.c (rb_ary_s_create): no need for negative argc check.
  [ruby-core:04463]

* array.c (rb_ary_unshift_m): ditto.

* lib/xmlrpc/parser.rb (XMLRPC::FaultException): make it subclass
  of StandardError class, not Exception class.  [ruby-core:04429]

* parse.y (fcall_gen): lvar(arg) will be evaluated as
  lvar.call(arg) when lvar is a defined local variable. [new]

* object.c (rb_class_initialize): call inherited method before
  calling initializing block.

* eval.c (rb_thread_start_1): initialize newly pushed frame.

* lib/open3.rb (Open3::popen3): $? should not be EXIT_FAILURE.
  fixed: [ruby-core:04444]

* eval.c (is_defined): NODE_IASGN is an assignment.

* ext/readline/readline.c (Readline.readline): use rl_outstream
  and rl_instream.  [ruby-dev:25699]

* ext/etc/etc.c (Init_etc): sGroup needs HAVE_ST_GR_PASSWD check
  [ruby-dev:25675]

* misc/ruby-mode.el: [ruby-core:04415]

* lib/rdoc/generators/html_generator.rb: [ruby-core:04412]

* lib/rdoc/generators/ri_generator.rb: ditto.

* struct.c (make_struct): fixed: [ruby-core:04402]

* ext/curses/curses.c (window_color_set): [ruby-core:04393]

* ext/socket/socket.c (Init_socket): SO_REUSEPORT added.
  [ruby-talk:130092]

* object.c: [ruby-doc:818]

* parse.y (open_args): fix too verbose warnings for the space
  before argument parentheses.  [ruby-dev:25492]

* parse.y (parser_yylex): ditto.

* parse.y (parser_yylex): the first expression in the parentheses
  should not be a command.  [ruby-dev:25492]

* lib/irb/context.rb (IRB::Context::initialize): [ruby-core:04330]

* object.c (Init_Object): remove Object#type.  [ruby-core:04335]

* st.c (st_foreach): report success/failure by return value.
  [ruby-Bugs-1396]

* parse.y: forgot to initialize parser struct.  [ruby-dev:25492]

* parse.y (parser_yylex): no tLABEL on EXPR_BEG.
  [ruby-talk:127711]

* document updates - [ruby-core:04296], [ruby-core:04301],
  [ruby-core:04302], [ruby-core:04307]

* dir.c (rb_push_glob): should work for NUL delimited patterns.

* dir.c (rb_glob2): should aware of offset in the pattern.

* string.c (rb_str_new4): should propagate taintedness.

* env.h: rename member names in struct FRAME; last_func -> callee,
  orig_func -> this_func, last_class -> this_class.

* struct.c (rb_struct_set): use original method name, not callee
  name, to retrieve member slot.  [ruby-core:04268]

* time.c (time_strftime): protect from format modification from GC
  finalizers.

* object.c (Init_Object): remove rb_obj_id_obsolete()

* eval.c (rb_mod_define_method): incomplete subclass check.
  [ruby-dev:25464]

* gc.c (rb_data_object_alloc): klass may be NULL.
  [ruby-list:40498]

* bignum.c (rb_big_rand): should return positive random number.
  [ruby-dev:25401]

* bignum.c (rb_big_rand): do not use rb_big_modulo to generate
  random bignums.  [ruby-dev:25396]

* variable.c (rb_autoload): [ruby-dev:25373]

* eval.c (svalue_to_avalue): [ruby-dev:25366]

* string.c (rb_str_justify): [ruby-dev:25367]

* io.c (rb_f_select): [ruby-dev:25312]

* ext/socket/socket.c (sock_s_getservbyport): [ruby-talk:124072]

* struct.c (make_struct): [ruby-dev:25249]

* dir.c (dir_open_dir): new function.  [ruby-dev:25242]

* io.c (rb_f_open): add type check for return value from to_open.

* 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/trunk@8068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-04 06:47:45 +00:00
aamine 8af8ebfb92 update copyright year
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-01 08:59:48 +00:00
aamine 0a4a9dbaea * lib/fileutils.rb (copy_stream): use read/write instead of sysread/syswrite, which allows duck typing. [ruby-dev:25369]
* lib/fileutils.rb (copy_stream): does NOT support nonblocking IO. [ruby-dev:25370]
* test/fileutils/test_fileutils.rb: test copy_entry, copy_file, copy_stream.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-01 07:22:04 +00:00
aamine ea12b3eb53 * lib/fileutils.rb (mv): should raise error when moving a directory to the (empty) directory. [ruby-talk:124368]
* lib/fileutils.rb (mv): wrongly did not overwrite file on Win32 platforms.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-27 06:15:32 +00:00
aamine 95a5b4e9a4 * lib/fileutils.rb: (In previous commit) new method chown.
* lib/fileutils.rb: (In previous commit) new method chown_R.
* lib/fileutils.rb: (In previous commit) new method chmod_R wrongly added.  Removed now.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-04 12:29:55 +00:00
aamine 7c0370dcaf * lib/fileutils.rb (mkdir, mkdir_p): should chmod explicitly. [ruby-core:03881]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-04 11:46:24 +00:00
aamine e9f4ad970a * lib/fileutils.rb (fu_traverse): return value of Dir.entries is reliable. (pass $SAFE=1)
* lib/fileutils.rb (remove_dir): return value of Dir.foreach is reliable. (pass $SAFE=1)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-08 12:37:19 +00:00
aamine ed1a776ae0 * lib/fileutils.rb (mkdir_p): should pass mode argument to Dir.mkdir. [ruby-dev:24242]
* test/fileutils/test_fileutils.rb: test it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-10 06:56:20 +00:00
aamine 18c0a86cc6 * lib/fileutils.rb (cp_r): copies symlink to symlink, except cp_r root.
* lib/fileutils.rb: new method FileUtils.copy_entry.
* test/fileutils/test_fileutils.rb: more cp_r tests.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-08-08 21:35:11 +00:00
aamine 97391920d3 * lib/fileutils.rb (mv): new option `force'. [ruby-talk:99457]
* lib/fileutils.rb: new method for command option reflection: FileUtils.commands, .options, .have_option?, .options_of, .collect_methods.
* lib/fileutils.rb: module Verbose, NoWrite, DryRun do not have option flags @fileutils_verbose and @fileutils_noop, they make no sense.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-07 13:08:12 +00:00
aamine 876aa19435 * lib/fileutils.rb (fu_list): Array() breaks pathes including "\n". [ruby-core:02843]
* test/fileutils/test_fileutils.rb (mkdir): test "\n" in path.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-07 12:04:19 +00:00
matz 4ded52b623 * file.c (rb_get_path): get path string via "to_path" method if
path object is not a string. [Ruby2]

* gc.c (rb_gc_call_finalizer_at_exit): do not free threads in the
  exit finalizers.

* io.c (rb_io_reopen): should use rb_io_check_io().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-07 02:51:05 +00:00
aamine fb9d31c327 * lib/fileutils.rb (remove_dir): should handle symlink correctly. This patch is contributed by Christian Loew. [ruby-talk:94635]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-10 13:26:38 +00:00
aamine b1772b8c40 * lib/fileutils.rb: new module FileUtils::DryRun.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-16 16:23:07 +00:00
gsinclair be1de4f8db * lib/fileutils.rb: slighly improved documentation (sync with 1.8)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-13 12:53:42 +00:00
nobu ff9c34b3f4 * Makefile.in, bcc32/Makefile.sub, win32/Makefile.sub, configure.in,
runruby.rb: run rdoc, test and so on with compiled extension
  libraries.  [ruby-dev:22688]

* ext/extmk.rb, lib/mkmf.rb: make extension libraries in separated
  directory, similar to the actual directory structure.

* lib/fileutils.rb (FileUtils.copy_file): use the mode of the original
  file to create new file.

* lib/rdoc/ri/ri_paths.rb (RI::Paths::SYSDIR): get rid of unexpected
  influence by envirionment variable.

* bcc32/configure.bat, win32/configure.bat: add install-doc options.

* win32/win32.c, win32/win32.h (rb_w32_fstat): fix Borland C runtime
  bug which returns wrong mode.  [ruby-dev:22846]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-09 08:48:55 +00:00
aamine 232b4c2073 * lib/fileutils.rb (mkdir): remove trailing `/' from pathes.
* lib/fileutils.rb (rmdir): ditto. [ruby-dev:22238]
* lib/fileutils.rb (rmdir_r): ditto.
* lib/fileutils.rb (fu_copy_dir): check if it is a directory after mkdir(2).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-12 10:33:24 +00:00
aamine d44d45450f * lib/fileutils.rb (mkdir_p): remove trailing `/' befere mkdir(2). mkdir("nonexistdir/") does not work on NetBSD/Alpha 1.6.1.
* lib/fileutils.rb (fu_list): call to_str for all arguments.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-11 11:54:50 +00:00
aamine 5c3abcd043 catch all SystemCallErrors.
* lib/fileutils.rb (mkdir_p): catch all SystemCallErrors (mkdir("C:\") causes EACCESS on Windows 2000/NTFS).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-11 10:54:17 +00:00
aamine eb5a174119 * lib/fileutils.rb (mkdir_p): check if it is a directory after mkdir(2) instead of before mkdir(2), to avoid race condition. [ruby-talk:87730]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-11 10:15:54 +00:00
aamine eec8dd6737 * lib/fileutils.rb: def m( arg ) -> def m(arg).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-11 09:49:47 +00:00
aamine e5690fcd6d * lib/fileutils.rb (fu_each_src_dest0): call #to_str to allow Pathname for arguments. [ruby-core:01795]
* test/fileutils/test_fileutils.rb: does much strict test on "same" files detecting.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-01 05:18:46 +00:00
aamine 061f8361da * lib/fileutils.rb (have_st_ino?): djgpp has valid st_ino.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-22 04:10:32 +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
aamine edb9ab1b15 * lib/fileutils.rb (have_st_ino?): emx (OS/2 with EMX) does not have st_ino (always 0). [ruby-dev:21972]
* lib/fileutils.rb (rename_cannot_overwrite_file?): emx does not allow overwriting files by rename(2).
* test/fileutils/test_fileutils.rb: windows? -> have_drive_letter?, have_file_perm?


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-20 10:16:27 +00:00
aamine a74dd747e3 * lib/fileutils.rb (fu_same?): add djgpp and wince.
* lib/fileutils.rb (cannot_overwrite?): add wince.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-19 05:33:07 +00:00
usa 0a50ed6611 * lib/fileutils.rb (cannot_overwrite_file?, have_st_ino?): bccwin32
is same as mswin32.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-19 02:06:37 +00:00
aamine 6874cb465a * lib/fileutils.rb (fu_same?): temporal fix for windows.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-18 13:24:48 +00:00
aamine 1c0cee4f83 * lib/fileutils.rb (fu_same?): check by inode instead of path name, to detect two hard links pointing to the same content.
* test/fileutils.rb: did not create correctly looped symlinks.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-18 10:05:21 +00:00