зеркало из https://github.com/github/ruby.git
* file.c, ext/etc/etc.c, ext/socket/unixsocket.c,
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
This commit is contained in:
Родитель
adb575e21e
Коммит
bfb334eefa
|
@ -1,3 +1,9 @@
|
|||
Thu May 9 21:09:57 2013 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* file.c, ext/etc/etc.c, ext/socket/unixsocket.c,
|
||||
ext/openssl/ossl.h, ext/openssl/openssl_missing.c: Use
|
||||
HAVE_AGGREGATE_MEMBER instead of HAVE_ST_MEMBER.
|
||||
|
||||
Thu May 9 20:43:41 2013 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* ext/socket/ancdata.c (bsock_sendmsg_internal): Always set
|
||||
|
|
|
@ -89,32 +89,32 @@ setup_passwd(struct passwd *pwd)
|
|||
if (pwd == 0) rb_sys_fail("/etc/passwd");
|
||||
return rb_struct_new(sPasswd,
|
||||
safe_setup_str(pwd->pw_name),
|
||||
#ifdef HAVE_ST_PW_PASSWD
|
||||
#ifdef HAVE_STRUCT_PASSWD_PW_PASSWD
|
||||
safe_setup_str(pwd->pw_passwd),
|
||||
#endif
|
||||
UIDT2NUM(pwd->pw_uid),
|
||||
GIDT2NUM(pwd->pw_gid),
|
||||
#ifdef HAVE_ST_PW_GECOS
|
||||
#ifdef HAVE_STRUCT_PASSWD_PW_GECOS
|
||||
safe_setup_str(pwd->pw_gecos),
|
||||
#endif
|
||||
safe_setup_str(pwd->pw_dir),
|
||||
safe_setup_str(pwd->pw_shell),
|
||||
#ifdef HAVE_ST_PW_CHANGE
|
||||
#ifdef HAVE_STRUCT_PASSWD_PW_CHANGE
|
||||
INT2NUM(pwd->pw_change),
|
||||
#endif
|
||||
#ifdef HAVE_ST_PW_QUOTA
|
||||
#ifdef HAVE_STRUCT_PASSWD_PW_QUOTA
|
||||
INT2NUM(pwd->pw_quota),
|
||||
#endif
|
||||
#ifdef HAVE_ST_PW_AGE
|
||||
#ifdef HAVE_STRUCT_PASSWD_PW_AGE
|
||||
PW_AGE2VAL(pwd->pw_age),
|
||||
#endif
|
||||
#ifdef HAVE_ST_PW_CLASS
|
||||
#ifdef HAVE_STRUCT_PASSWD_PW_CLASS
|
||||
safe_setup_str(pwd->pw_class),
|
||||
#endif
|
||||
#ifdef HAVE_ST_PW_COMMENT
|
||||
#ifdef HAVE_STRUCT_PASSWD_PW_COMMENT
|
||||
safe_setup_str(pwd->pw_comment),
|
||||
#endif
|
||||
#ifdef HAVE_ST_PW_EXPIRE
|
||||
#ifdef HAVE_STRUCT_PASSWD_PW_EXPIRE
|
||||
INT2NUM(pwd->pw_expire),
|
||||
#endif
|
||||
0 /*dummy*/
|
||||
|
@ -359,7 +359,7 @@ setup_group(struct group *grp)
|
|||
}
|
||||
return rb_struct_new(sGroup,
|
||||
safe_setup_str(grp->gr_name),
|
||||
#ifdef HAVE_ST_GR_PASSWD
|
||||
#ifdef HAVE_STRUCT_GROUP_GR_PASSWD
|
||||
safe_setup_str(grp->gr_passwd),
|
||||
#endif
|
||||
GIDT2NUM(grp->gr_gid),
|
||||
|
@ -680,26 +680,26 @@ Init_etc(void)
|
|||
|
||||
sPasswd = rb_struct_define(NULL,
|
||||
"name", "passwd", "uid", "gid",
|
||||
#ifdef HAVE_ST_PW_GECOS
|
||||
#ifdef HAVE_STRUCT_PASSWD_PW_GECOS
|
||||
"gecos",
|
||||
#endif
|
||||
"dir", "shell",
|
||||
#ifdef HAVE_ST_PW_CHANGE
|
||||
#ifdef HAVE_STRUCT_PASSWD_PW_CHANGE
|
||||
"change",
|
||||
#endif
|
||||
#ifdef HAVE_ST_PW_QUOTA
|
||||
#ifdef HAVE_STRUCT_PASSWD_PW_QUOTA
|
||||
"quota",
|
||||
#endif
|
||||
#ifdef HAVE_ST_PW_AGE
|
||||
#ifdef HAVE_STRUCT_PASSWD_PW_AGE
|
||||
"age",
|
||||
#endif
|
||||
#ifdef HAVE_ST_PW_CLASS
|
||||
#ifdef HAVE_STRUCT_PASSWD_PW_CLASS
|
||||
"uclass",
|
||||
#endif
|
||||
#ifdef HAVE_ST_PW_COMMENT
|
||||
#ifdef HAVE_STRUCT_PASSWD_PW_COMMENT
|
||||
"comment",
|
||||
#endif
|
||||
#ifdef HAVE_ST_PW_EXPIRE
|
||||
#ifdef HAVE_STRUCT_PASSWD_PW_EXPIRE
|
||||
"expire",
|
||||
#endif
|
||||
NULL);
|
||||
|
@ -728,19 +728,19 @@ Init_etc(void)
|
|||
* contains a longer String description of the user, such as
|
||||
* a full name. Some Unix systems provide structured information in the
|
||||
* gecos field, but this is system-dependent.
|
||||
* must be compiled with +HAVE_ST_PW_GECOS+
|
||||
* must be compiled with +HAVE_STRUCT_PASSWD_PW_GECOS+
|
||||
* change::
|
||||
* password change time(integer) must be compiled with +HAVE_ST_PW_CHANGE+
|
||||
* password change time(integer) must be compiled with +HAVE_STRUCT_PASSWD_PW_CHANGE+
|
||||
* quota::
|
||||
* quota value(integer) must be compiled with +HAVE_ST_PW_QUOTA+
|
||||
* quota value(integer) must be compiled with +HAVE_STRUCT_PASSWD_PW_QUOTA+
|
||||
* age::
|
||||
* password age(integer) must be compiled with +HAVE_ST_PW_AGE+
|
||||
* password age(integer) must be compiled with +HAVE_STRUCT_PASSWD_PW_AGE+
|
||||
* class::
|
||||
* user access class(string) must be compiled with +HAVE_ST_PW_CLASS+
|
||||
* user access class(string) must be compiled with +HAVE_STRUCT_PASSWD_PW_CLASS+
|
||||
* comment::
|
||||
* comment(string) must be compiled with +HAVE_ST_PW_COMMENT+
|
||||
* comment(string) must be compiled with +HAVE_STRUCT_PASSWD_PW_COMMENT+
|
||||
* expire::
|
||||
* account expiration time(integer) must be compiled with +HAVE_ST_PW_EXPIRE+
|
||||
* account expiration time(integer) must be compiled with +HAVE_STRUCT_PASSWD_PW_EXPIRE+
|
||||
*/
|
||||
rb_define_const(mEtc, "Passwd", sPasswd);
|
||||
rb_set_class_path(sPasswd, mEtc, "Passwd");
|
||||
|
@ -750,7 +750,7 @@ Init_etc(void)
|
|||
|
||||
#ifdef HAVE_GETGRENT
|
||||
sGroup = rb_struct_define(NULL, "name",
|
||||
#ifdef HAVE_ST_GR_PASSWD
|
||||
#ifdef HAVE_STRUCT_GROUP_GR_PASSWD
|
||||
"passwd",
|
||||
#endif
|
||||
"gid", "mem", NULL);
|
||||
|
@ -769,7 +769,7 @@ Init_etc(void)
|
|||
* string is returned if no password is needed to obtain membership of
|
||||
* the group.
|
||||
*
|
||||
* Must be compiled with +HAVE_ST_GR_PASSWD+.
|
||||
* Must be compiled with +HAVE_STRUCT_GROUP_GR_PASSWD+.
|
||||
* gid::
|
||||
* contains the group's numeric ID as an integer.
|
||||
* mem::
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
#include RUBY_EXTCONF_H
|
||||
|
||||
#if defined(HAVE_OPENSSL_ENGINE_H) && defined(HAVE_ST_ENGINE)
|
||||
#if defined(HAVE_OPENSSL_ENGINE_H) && defined(HAVE_EVP_CIPHER_CTX_ENGINE)
|
||||
# include <openssl/engine.h>
|
||||
#endif
|
||||
#include <openssl/x509_vfy.h>
|
||||
|
@ -122,7 +122,7 @@ EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, EVP_CIPHER_CTX *in)
|
|||
{
|
||||
memcpy(out, in, sizeof(EVP_CIPHER_CTX));
|
||||
|
||||
#if defined(HAVE_ENGINE_ADD) && defined(HAVE_ST_ENGINE)
|
||||
#if defined(HAVE_ENGINE_ADD) && defined(HAVE_EVP_CIPHER_CTX_ENGINE)
|
||||
if (in->engine) ENGINE_add(out->engine);
|
||||
if (in->cipher_data) {
|
||||
out->cipher_data = OPENSSL_malloc(in->cipher->ctx_size);
|
||||
|
|
|
@ -66,7 +66,7 @@ extern "C" {
|
|||
#include <openssl/conf_api.h>
|
||||
#undef X509_NAME
|
||||
#undef PKCS7_SIGNER_INFO
|
||||
#if defined(HAVE_OPENSSL_ENGINE_H) && defined(HAVE_ST_ENGINE)
|
||||
#if defined(HAVE_OPENSSL_ENGINE_H) && defined(HAVE_EVP_CIPHER_CTX_ENGINE)
|
||||
# define OSSL_ENGINE_ENABLED
|
||||
# include <openssl/engine.h>
|
||||
#endif
|
||||
|
|
|
@ -163,7 +163,7 @@ unix_recvfrom(int argc, VALUE *argv, VALUE sock)
|
|||
#define FD_PASSING_BY_MSG_CONTROL 0
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_ST_MSG_ACCRIGHTS)
|
||||
#if defined(HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS)
|
||||
#define FD_PASSING_BY_MSG_ACCRIGHTS 1
|
||||
#else
|
||||
#define FD_PASSING_BY_MSG_ACCRIGHTS 0
|
||||
|
|
8
file.c
8
file.c
|
@ -531,7 +531,7 @@ rb_stat_gid(VALUE self)
|
|||
static VALUE
|
||||
rb_stat_rdev(VALUE self)
|
||||
{
|
||||
#ifdef HAVE_ST_RDEV
|
||||
#ifdef HAVE_STRUCT_STAT_ST_RDEV
|
||||
return DEVT2NUM(get_stat(self)->st_rdev);
|
||||
#else
|
||||
return Qnil;
|
||||
|
@ -552,7 +552,7 @@ rb_stat_rdev(VALUE self)
|
|||
static VALUE
|
||||
rb_stat_rdev_major(VALUE self)
|
||||
{
|
||||
#if defined(HAVE_ST_RDEV) && defined(major)
|
||||
#if defined(HAVE_STRUCT_STAT_ST_RDEV) && defined(major)
|
||||
return DEVT2NUM(major(get_stat(self)->st_rdev));
|
||||
#else
|
||||
return Qnil;
|
||||
|
@ -573,7 +573,7 @@ rb_stat_rdev_major(VALUE self)
|
|||
static VALUE
|
||||
rb_stat_rdev_minor(VALUE self)
|
||||
{
|
||||
#if defined(HAVE_ST_RDEV) && defined(minor)
|
||||
#if defined(HAVE_STRUCT_STAT_ST_RDEV) && defined(minor)
|
||||
return DEVT2NUM(minor(get_stat(self)->st_rdev));
|
||||
#else
|
||||
return Qnil;
|
||||
|
@ -609,7 +609,7 @@ rb_stat_size(VALUE self)
|
|||
static VALUE
|
||||
rb_stat_blksize(VALUE self)
|
||||
{
|
||||
#ifdef HAVE_ST_BLKSIZE
|
||||
#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE
|
||||
return ULONG2NUM(get_stat(self)->st_blksize);
|
||||
#else
|
||||
return Qnil;
|
||||
|
|
Загрузка…
Ссылка в новой задаче