flush
[m6w6/ext-psi] / config.m4
index ee54dac1f5b12d9a809dd7fe0d0771fd0d258ae4..6854fd20d99037ac30f6647ed461e34212922d95 100644 (file)
--- a/config.m4
+++ b/config.m4
@@ -199,6 +199,7 @@ if test "$PHP_PSI" != "no"; then
        dnl PSI_STRUCT(name, members, member type cases, includes)
        PSI_STRUCTS=
        AC_DEFUN(PSI_STRUCT, [
        dnl PSI_STRUCT(name, members, member type cases, includes)
        PSI_STRUCTS=
        AC_DEFUN(PSI_STRUCT, [
+               AC_CHECK_SIZEOF(struct $1, [], PSI_INCLUDES_DEFAULT($4))
                psi_struct_members=
                m4_foreach(member, [$2], [
                        AC_CHECK_MEMBER(struct $1.member, [
                psi_struct_members=
                m4_foreach(member, [$2], [
                        AC_CHECK_MEMBER(struct $1.member, [
@@ -227,7 +228,7 @@ if test "$PHP_PSI" != "no"; then
                                fi
                        ], [], PSI_INCLUDES_DEFAULT($4))
                ])
                                fi
                        ], [], PSI_INCLUDES_DEFAULT($4))
                ])
-               PSI_STRUCTS="{\"$1\", {$psi_struct_members}}, $PSI_STRUCTS"
+               PSI_STRUCTS="{\"$1\", $ac_cv_sizeof_struct_$1, {$psi_struct_members}}, $PSI_STRUCTS"
        ])
 
        AC_TYPE_INT8_T
        ])
 
        AC_TYPE_INT8_T
@@ -374,7 +375,8 @@ if test "$PHP_PSI" != "no"; then
                [st_blocks],
                [st_flags],
                [st_gen]], [
                [st_blocks],
                [st_flags],
                [st_gen]], [
-               st_?tim*) psi_member_type="struct timespec" ;;
+               st_?tim) psi_member_type="struct timespec" ;;
+               st_*timespec) psi_member_type="struct timespec" ;;
        ], sys/stat.h)
        PSI_CONST(S_IFMT, int, sys/stat.h)
        PSI_CONST(S_IFBLK, int, sys/stat.h)
        ], sys/stat.h)
        PSI_CONST(S_IFMT, int, sys/stat.h)
        PSI_CONST(S_IFBLK, int, sys/stat.h)
@@ -417,6 +419,13 @@ if test "$PHP_PSI" != "no"; then
        PSI_CONST(ITIMER_REAL, int, sys/time.h)
        PSI_CONST(ITIMER_VIRTUAL, int, sys/time.h)
        PSI_CONST(ITIMER_PROF, int, sys/time.h)
        PSI_CONST(ITIMER_REAL, int, sys/time.h)
        PSI_CONST(ITIMER_VIRTUAL, int, sys/time.h)
        PSI_CONST(ITIMER_PROF, int, sys/time.h)
+       dnl sys/times.h
+       PSI_STRUCT(tms, [
+               [tms_utime],
+               [tms_stime],
+               [tms_cutime],
+               [tms_cstime]], [
+       ], sys/times.h)
        dnl sys/types.h
        PSI_TYPE(blkcnt_t, int)
        PSI_TYPE(blksize_t, int)
        dnl sys/types.h
        PSI_TYPE(blkcnt_t, int)
        PSI_TYPE(blksize_t, int)