summaryrefslogtreecommitdiff
path: root/ext/etc
AgeCommit message (Collapse)Author
2017-06-19Make string literal to frozen object on gemspec of defulte gems.hsbt
Added following gemspecs. * extensions: date, dbm, etc, fiddle, gdbm, sdbm, stringio, strscan, zlib * pure ruby libraries: cmath, csv, fileutils, scanf, webrick psych and rdoc is out of scope of this commit. I will merge after upstream was change to `frozen_string_literal: true`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-11Merge upstream of ruby/etc.hsbt
* Do not use `git ls-files` for file listing. * Fix extconf.rb path. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-11Fix a typo.hsbt
Patch by @voxik. [fix GH-1581] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-11Import gemspec from ruby/etc.hsbt
* Update configuraiton for gem release. * Bump version to 0.2.1. Because 0.2.0 is already reserved on rubygems.org git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-22ruby tool/update-deps --fixshyouhei
Onigumo 6 (r57045) introduced new onigumo.h header file, which is required from quite much everywhere. This commit adds necessary dependencies. Note: ruby/oniguruma.h now includes onigumo.h, ruby/io.h includes oniguruma.h, ruby/encoding.h also includes oniguruma.h, and internal.h includes encoding.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-27Added initial gemspec for Etc module.hsbt
[Feature #13256] * doc/*.rdoc: move Etc module to default gem section. * ext/etc/etc.gemspec: first gemspec. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-29{ext,test}/etc: Specify frozen_string_literal: true.kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-06Update dependenciesnobu
* common.mk (compile.o, loadpath.o): update dependencies. * common.mk (vm_call.o): remove stale object dependencies. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-02etc.c: retry with allocated string buffernobu
* ext/etc/etc.c (etc_systmpdir): retry with allocated string buffer if static buffer size is not enough. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16handle ext/ as r53141naruse
g -L frozen_string_literal ext/**/*.rb|xargs ruby -Ka -e'ARGV.each{|fn|puts fn;open(fn,"r+"){|f|s=f.read.sub(/\A(#!.*\n)?(#.*coding.*\n)?/,"\\&# frozen_string_literal: false\n");f.rewind;f.write s}}' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-19ext: suppress warningsnobu
* ext/{etc,openssl,tk}: Adding parens and comparisons around assignments to get rid of Wparentheses warnings. [Fix GH-875] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-10win32.c: login name encodingnobu
* ext/etc/etc.c (etc_getlogin): set login name encoding properly. [ruby-core:66163] [Bug #10493] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-21* ext/etc/etc.c (etc_nprocessors_affin): maximum "n" should be 16384.kosaki
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-21* ext/etc/etc.c (etc_nprocessors_affin): minor spell fix.kosaki
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-21* ext/etc/etc.c (etc_nprocessors_affin): optimize memory usege akosaki
bit. Typical rubyist never use 8k cpus machine. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-15update doc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-15* ext/etc/etc.c (etc_nprocessors_affin): Test CPU_ALLOC availability.akr
CentOS 5 don't have CPU_ALLOC(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-15* ext/etc/etc.c (etc_nprocessors_affinity): use sched_getaffinityakr
for getting precious number of available cpus. * ext/etc/etc.c (etc_nprocessors): use etc_nprocessors_affinity if possible. [Feature #10267] etc-nprocessors-kosaki2.patch git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07ext/etc/etc.c (etc_systmpdir): set default tmplen correctlynormal
Fixup r47826. This fixes the following test failure for me: TestRequire#test_tainted_loadpath [test/ruby/test_require.rb:331]: SecurityError expected but nothing was raised. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07etc.c: try confstr on Mac OS Xnobu
* ext/etc/etc.c (etc_systmpdir): try user temporary directory by confstr() on Mac OS X. c.f. http://www.opensource.apple.com/source/ruby/ruby-104/patches/ext_etc_etc.c.diff git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-05update doc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-02* ext/etc/etc.c (etc_nprocessors): Windows support.usa
see [Feature #10267] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-02* ext/etc/etc.c (etc_nprocessors): New method.akr
Accepted by matz at RubyKaigi 2014. [ruby-core:65142] [Feature #10267] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-06mkconstants.rb: remove empty commentsnobu
* ext/etc/mkconstants.rb: remove empty comments, defaut_proc isn't called by accessing nil-assigned elements, and the same content is useless. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-05ext/etc: distcleannobu
* ext/etc/extconf.rb: clean constdefs.h at distclean. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-19etc.c: fix typonobu
* ext/etc/etc.c (etc_uname): fix typo, `len` with `plen`, and an extra semicolon. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-19etc.c: old VCnobu
* ext/etc/etc.c (etc_uname): fix for old VC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-19etc.c: fix parameternobu
* ext/etc/etc.c (etc_uname): call with same first parameters. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-19etc.c: Etc.uname on Windowsnobu
* ext/etc/etc.c (etc_uname): add support for Windows using GetVersionExW(), GetSystemInfo(), and GetComputerNameExW() with `ComputerNameDnsHostname`. [Feature #9842] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-18[DOC]akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-18Fix a dependency for etc.o.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-18[DOC]akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-18* ext/etc/etc.c: Etc.sysconf, Etc.confstr and IO#pathconf implemented.akr
* ext/etc/extconf.rb: Check sysconf(), confstr() and fpathconf(). * ext/etc/mkconstants.rb: New file. [ruby-core:62600] [Feature #9842] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-18* ext/etc/etc.c: Etc.uname method implemented.akr
* ext/etc/extconf.rb: Check uname() function. [ruby-core:62139] [Feature #9770] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-23* ext/etc/extconf.rb: Build ext/etc unconditionally.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-03etc.c: encodingsnobu
* ext/etc/etc.c (setup_passwd, setup_group): set proper encodings to string members. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-03struct.c: rb_struct_define_undernobu
* struct.c (rb_struct_define_under): new function to define Struct under the given namespace, not under Struct. [Feature #8264] * ext/etc/etc.c: use rb_struct_define_under. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-22* ext/etc/etc.c (setup_passwd): revert r41560, unnecessarycharliesome
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-22* ext/etc/etc.c (Init_etc): omit 'passwd' from definition of Etc::Passwdcharliesome
if HAVE_STRUCT_PASSWD_PW_PASSWD is not defined to prevent mismatch of fields and values in setup_passwd git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-22* ext/etc/etc.c (setup_passwd): pass 0 as VALUE to rb_struct_new tocharliesome
prevent segfault if the compiler passes it as a 32 bit integer on a 64 bit ruby git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-22* ext/etc/etc.c (etc_getpwnam): use PRIsVALUE in format string insteadcharliesome
of %s and RSTRING_PTR * ext/etc/etc.c (etc_getgrnam): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12* safe.c (rb_set_safe_level, safe_setter): raise an ArgumentErrorshugo
when $SAFE is set to 4. $SAFE=4 is now obsolete. [ruby-core:55222] [Feature #8468] * object.c (rb_obj_untrusted, rb_obj_untrust, rb_obj_trust): Kernel#untrusted?, untrust, and trust are now deprecated. Their behavior is same as tainted?, taint, and untaint, respectively. * include/ruby/ruby.h (OBJ_UNTRUSTED, OBJ_UNTRUST): OBJ_UNTRUSTED() and OBJ_UNTRUST() are aliases of OBJ_TAINTED() and OBJ_TAINT(), respectively. * array.c, class.c, debug.c, dir.c, encoding.c, error.c, eval.c, ext/curses/curses.c, ext/dbm/dbm.c, ext/dl/cfunc.c, ext/dl/cptr.c, ext/dl/dl.c, ext/etc/etc.c, ext/fiddle/fiddle.c, ext/fiddle/pointer.c, ext/gdbm/gdbm.c, ext/readline/readline.c, ext/sdbm/init.c, ext/socket/ancdata.c, ext/socket/basicsocket.c, ext/socket/socket.c, ext/socket/udpsocket.c, ext/stringio/stringio.c, ext/syslog/syslog.c, ext/tk/tcltklib.c, ext/win32ole/win32ole.c, file.c, gc.c, hash.c, io.c, iseq.c, load.c, marshal.c, object.c, proc.c, process.c, random.c, re.c, safe.c, string.c, thread.c, transcode.c, variable.c, vm_insnhelper.c, vm_method.c, vm_trace.c: remove code for $SAFE=4. * test/dl/test_dl2.rb, test/erb/test_erb.rb, test/readline/test_readline.rb, test/readline/test_readline_history.rb, test/ruby/test_alias.rb, test/ruby/test_array.rb, test/ruby/test_dir.rb, test/ruby/test_encoding.rb, test/ruby/test_env.rb, test/ruby/test_eval.rb, test/ruby/test_exception.rb, test/ruby/test_file_exhaustive.rb, test/ruby/test_hash.rb, test/ruby/test_io.rb, test/ruby/test_method.rb, test/ruby/test_module.rb, test/ruby/test_object.rb, test/ruby/test_pack.rb, test/ruby/test_rand.rb, test/ruby/test_regexp.rb, test/ruby/test_settracefunc.rb, test/ruby/test_struct.rb, test/ruby/test_thread.rb, test/ruby/test_time.rb: remove tests for $SAFE=4. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-09* file.c, ext/etc/etc.c, ext/socket/unixsocket.c,akr
ext/openssl/ossl.h, ext/openssl/openssl_missing.c: Use HAVE_AGGREGATE_MEMBER instead of HAVE_ST_MEMBER. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-13* lib/mkmf.rb: Add ruby/ruby.h, ruby/missing.h, ruby/intern.h,akr
ruby/st.h and ruby/subst.h for ruby_headers in generated Makefile. * ext/-test-/old_thread_select/depend: Update dependencies. * ext/-test-/wait_for_single_fd/depend: Ditto. * ext/bigdecimal/depend: Ditto. * ext/curses/depend: Ditto. * ext/digest/bubblebabble/depend: Ditto. * ext/digest/depend: Ditto. * ext/digest/md5/depend: Ditto. * ext/digest/rmd160/depend: Ditto. * ext/digest/sha1/depend: Ditto. * ext/digest/sha2/depend: Ditto. * ext/dl/callback/depend: Ditto. * ext/dl/depend: Ditto. * ext/etc/depend: Ditto. * ext/nkf/depend: Ditto. * ext/objspace/depend: Ditto. * ext/pty/depend: Ditto. * ext/readline/depend: Ditto. * ext/ripper/depend: Ditto. * ext/sdbm/depend: Ditto. * ext/socket/depend: Ditto. * ext/stringio/depend: Ditto. * ext/strscan/depend: Ditto. * ext/syslog/depend: Ditto. * ext/-test-/num2int/depend: Removed. * ext/dbm/depend: Ditto. * ext/fcntl/depend: Ditto. * ext/gdbm/depend: Ditto. * ext/racc/cparse/depend: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-12* ext/etc/etc.c: fix struct name.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-12etc.c: Etc namespacenobu
* ext/etc/etc.c (Init_etc): move Passwd and Group under Etc namespace as primary names. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-07* doc/etc.rd: Removed stale documentation filezzak
* ext/etc/etc.c: Merged documentation from doc/etc.rd and updated rdoc, added documentation for Etc::Passwd and Etc::Group git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-13* ext/etc/etc.c (passwd_ensure): move endpwent() call fromakr
passwd_iterate to close /etc/passwd on exception. (group_ensure): move endgrent() call from group_iterate to close /etc/group on exception. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-04* whitespace cleanup.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-03* ext/etc/etc.c: Document Etc, Etc.sysconfdir, Etc.systmpdir. Patchdrbrain
by mathew murphy. [Ruby 1.9 - Bug #5396] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e