summaryrefslogtreecommitdiff
path: root/ext/etc
AgeCommit message (Collapse)Author
2018-05-28Merge etc gemspec from github repository.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-27Refactor ERB version checking for keyword argumentsk0kubun
Improving code like r62590. See r62529 for details. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-22erb.rb: deprecate safe_level of ERB.newk0kubun
Also, as it's in the middle of the list of 4 arguments, 3rd and 4th arguments (trim_mode, eoutvar) are changed to keyword arguments. Old ways to specify arguments are deprecated and warned now. bin/erb: deprecate -S option. We'll remove all of deprecated ones at Ruby 2.7+. enc/make_encmake.rb: stopped using deprecated interface ext/etc/mkconstants.rb: ditto ext/socket/mkconstants.rb: ditto sample/ripper/ruby2html.rb: ditto spec/ruby/library/erb/defmethod/def_erb_method_spec.rb: ditto spec/ruby/library/erb/new_spec.rb: ditto test/erb/test_erb.rb: ditto test/erb/test_erb_command.rb: ditto tool/generic_erb.rb: ditto tool/ruby_vm/helpers/dumper.rb: ditto tool/transcode-tblgen.rb: ditto lib/rdoc/erbio.rb: ditto lib/rdoc/generator/darkfish.rb: ditto [Feature #14256] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-13Bump version to etc-1.0.0 as default gems.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-07etc.c: improve docs for sysconfdirstomar
* ext/etc/etc.c: [DOC] small language fixes for etc_sysconfdir docs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-24sysconfdir on Windowsnobu
* ext/etc/etc.c (etc_sysconfdir): mentioned special case on Windows. [ruby-core:43110] [Bug #6121] * ext/etc/extconf.rb: define SYSCONFDIR only if sysconfdir is set in RbConfig::CONFIG and not empty. * win32/Makefile.sub (config.status): sysconfdir is not used on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-24Revert "sysconfdir on Windows"naruse
This reverts commit r60279. This breaks mswin build: https://ci.appveyor.com/project/ruby/ruby/build/1.0.5571 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21sysconfdir on Windowsnobu
* ext/etc/etc.c (etc_sysconfdir): mentioned special case on Windows. [ruby-core:43110] [Bug #6121] * win32/Makefile.sub (config.status): sysconfdir is not used on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-30ext: check if null byte is containednobu
[ruby-dev:50267] [Bug #13953] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-27ext: adjust indent [ci skip]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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