1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@8461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2005-05-15 09:56:53 +00:00
parent eebb06165f
commit e27aaa177e
3 changed files with 10 additions and 20 deletions

View file

@ -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 file

@ -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
@ -226,7 +226,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);],

18
ruby.h
View file

@ -82,24 +82,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