summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-09 12:12:17 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-09 12:12:17 +0000
commitbfb334eefa6fdebcf95af0b44f27117b754d93c7 (patch)
treecf47b9685de98607376c825a9c58eb513a3c4d61 /ext
parentadb575e21e176f73caa79838e98c8720269f12e2 (diff)
* 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
Diffstat (limited to 'ext')
-rw-r--r--ext/etc/etc.c50
-rw-r--r--ext/openssl/openssl_missing.c4
-rw-r--r--ext/openssl/ossl.h2
-rw-r--r--ext/socket/unixsocket.c2
4 files changed, 29 insertions, 29 deletions
diff --git a/ext/etc/etc.c b/ext/etc/etc.c
index 2d7d619312..c1cfead947 100644
--- a/ext/etc/etc.c
+++ b/ext/etc/etc.c
@@ -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::
diff --git a/ext/openssl/openssl_missing.c b/ext/openssl/openssl_missing.c
index f88dd403be..b5efaaf15d 100644
--- a/ext/openssl/openssl_missing.c
+++ b/ext/openssl/openssl_missing.c
@@ -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);
diff --git a/ext/openssl/ossl.h b/ext/openssl/ossl.h
index 88e4506fa8..96d0ade11e 100644
--- a/ext/openssl/ossl.h
+++ b/ext/openssl/ossl.h
@@ -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
diff --git a/ext/socket/unixsocket.c b/ext/socket/unixsocket.c
index c30dbb7956..1742496e84 100644
--- a/ext/socket/unixsocket.c
+++ b/ext/socket/unixsocket.c
@@ -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