summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-10-20 07:10:23 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-10-20 07:10:23 +0000
commitf137a720e935dd8461a6153c83b78b6cc269c744 (patch)
tree25f6e2a15a8e14b12ac653ac365d2fe34be0abd4 /ext
parent6eded0bb87a431f53f66aab0b306427b051f83c7 (diff)
downloadruby-f137a720e935dd8461a6153c83b78b6cc269c744.tar.gz
ruby-f137a720e935dd8461a6153c83b78b6cc269c744.tar.xz
ruby-f137a720e935dd8461a6153c83b78b6cc269c744.zip
marshal load GC protect
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/nkf/nkf.c4
-rw-r--r--ext/socket/extconf.rb1
-rw-r--r--ext/socket/getaddrinfo.c5
-rw-r--r--ext/socket/socket.c4
4 files changed, 5 insertions, 9 deletions
diff --git a/ext/nkf/nkf.c b/ext/nkf/nkf.c
index cde0f7a9a..b59688cb0 100644
--- a/ext/nkf/nkf.c
+++ b/ext/nkf/nkf.c
@@ -49,6 +49,7 @@ rb_nkf_kconv(obj, opt, src)
{
int i;
char *opt_ptr, *opt_end;
+ volatile VALUE v;
reinit();
opt_ptr = str2cstr(opt, &i);
@@ -64,7 +65,8 @@ rb_nkf_kconv(obj, opt, src)
input_ctr = 0;
input = str2cstr(src, &i_len);
- dst = rb_str_new(0, i_len*3 + 10); /* large enough? */
+ dst = rb_str_new(0, i_len*3 + 10);
+ v = dst;
output_ctr = 0;
output = RSTRING(dst)->ptr;
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index 467c052a8..6975994ef 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -148,7 +148,6 @@ EOF
$CFLAGS="-DHAVE_SA_LEN "+$CFLAGS
end
-have_header("sys/sysctl.h")
have_header("netinet/tcp.h")
have_header("netinet/udp.h")
diff --git a/ext/socket/getaddrinfo.c b/ext/socket/getaddrinfo.c
index 501ebd500..ebb03fe95 100644
--- a/ext/socket/getaddrinfo.c
+++ b/ext/socket/getaddrinfo.c
@@ -41,11 +41,6 @@
#include <sys/types.h>
#ifndef NT
#include <sys/param.h>
-#endif
-#ifdef HAVE_SYSCTL_H
-#include <sys/sysctl.h>
-#endif
-#ifndef NT
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index 408257eeb..b38cc48c9 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -16,10 +16,10 @@
#ifndef NT
#include <sys/socket.h>
#include <netinet/in.h>
-#ifdef NETINET_TCP
+#ifdef HAVE_NETINET_TCP_H
# include <netinet/tcp.h>
#endif
-#ifdef NETINET_UDP
+#ifdef HAVE_NETINET_UDP_H
# include <netinet/udp.h>
#endif
#include <netdb.h>