mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 13:04:13 +02:00
* dln.c: Ruby no longer supports MS-DOS.
* ext/sdbm/_sdbm.c: ditto. * ext/sdbm/sdbm.h: ditto. * gc.c: ditto. * hash.c: ditto. * include/ruby/defines.h: ditto. * include/ruby/util.h: ditto. * io.c: ditto. * process.c: ditto. * ruby.c: ditto. * strftime.c: ditto. * util.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8dd118c0db
commit
ae7ea3332b
13 changed files with 45 additions and 65 deletions
11
hash.c
11
hash.c
|
@ -2015,18 +2015,7 @@ ruby_setenv(const char *name, const char *value)
|
|||
}
|
||||
len = strlen(name) + strlen(value) + 2;
|
||||
environ[i] = ALLOC_N(char, len);
|
||||
#ifndef MSDOS
|
||||
snprintf(environ[i],len,"%s=%s",name,value); /* all that work just for this */
|
||||
#else
|
||||
/* MS-DOS requires environment variable names to be in uppercase */
|
||||
/* [Tom Dinger, 27 August 1990: Well, it doesn't _require_ it, but
|
||||
* some utilities and applications may break because they only look
|
||||
* for upper case strings. (Fixed strupr() bug here.)]
|
||||
*/
|
||||
strcpy(environ[i],name); strupr(environ[i]);
|
||||
sprintf(environ[i] + strlen(name),"=%s", value);
|
||||
#endif /* MSDOS */
|
||||
|
||||
#endif /* WIN32 */
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue