Permalink
Browse files

* configure.in, ruby.h: define rb_[pgu]id_t macros instead of typedefs

  to get rid of types which might not be defined yet.  [ruby-dev:26165]


git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information...
1 parent afa942c commit 76bfad4f67ea4bdd52c812262b875ee756f78912 @nobu nobu committed May 15, 2005
Showing with 10 additions and 20 deletions.
  1. +5 −0 ChangeLog
  2. +5 −2 configure.in
  3. +0 −18 ruby.h
View
5 ChangeLog
@@ -1,3 +1,8 @@
+Sun May 15 18:56:35 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in, ruby.h: define rb_[pgu]id_t macros instead of typedefs
+ to get rid of types which might not be defined yet. [ruby-dev:26165]
+
Sun May 15 14:35:46 2005 Tanaka Akira <akr@m17n.org>
* lib/pathname.rb (Pathname#unlink): unlink a symlink to a directory
View
7 configure.in
@@ -1,7 +1,7 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT()
-AC_PREREQ(2.50)
+AC_PREREQ(2.58)
AC_DEFUN(RUBY_MINGW32,
[case "$host_os" in
@@ -230,7 +230,10 @@ AC_CHECK_SIZEOF(float, 4)
AC_CHECK_SIZEOF(double, 8)
AC_CHECK_SIZEOF(time_t, 0)
-AC_CHECK_TYPES([pid_t, gid_t, uid_t])
+for id in pid_t gid_t uid_t; do
+ AC_CHECK_TYPE($id, [typ=$id], [typ=int])
+ AC_DEFINE_UNQUOTED(rb_$id, $typ)
+done
AC_CACHE_CHECK(for prototypes, rb_cv_have_prototypes,
[AC_TRY_COMPILE([int foo(int x) { return 0; }], [return foo(10);],
View
18 ruby.h
@@ -76,24 +76,6 @@ extern "C" {
typedef unsigned long VALUE;
typedef unsigned long ID;
-#ifndef HAVE_PID_T
- typedef int rb_pid_t;
-#else
- typedef pid_t rb_pid_t;
-#endif
-
-#ifndef HAVE_GID_T
- typedef int rb_gid_t;
-#else
- typedef gid_t rb_gid_t;
-#endif
-
-#ifndef HAVE_UID_T
- typedef int rb_uid_t;
-#else
- typedef uid_t rb_uid_t;
-#endif
-
#ifdef __STDC__
# include <limits.h>
#else

0 comments on commit 76bfad4

Please sign in to comment.