[PATCH] types.h bsize_t and sbsize_t definition

Jeffrey Layton Jeff.Layton@bellhowell.com
Tue Oct 8 11:35:00 GMT 2002


For some silly reason, HP-UX 11i (and I think at least 11.00), uses
bsize_t and sbsize_t in sendfile() (and maybe other system calls). The
types.h file included with gcc doesn't have these. This patch adds
definitions for those to types.h.

Perhaps it would be best to wrap this in something that only defines
this on HP-UX, but for now, this allowed me to build zftp.c in zsh. This
patch is against the types.h file included in 3.2.

-- 
Jeff Layton (Jeff.Layton@bellhowell.com)
Sr. Unix SysAdmin/DBA for Bell & Howell MMT

    "Any activity becomes creative when the doer cares about doing it
right,
     or doing it better."
        -- John Updike
-------------- next part --------------
--- types.h.orig	2002-10-08 14:33:37.000000000 -0400
+++ types.h	2002-10-08 14:33:55.000000000 -0400
@@ -484,6 +484,17 @@
 #  endif
 #endif /* ! __STDC_32_MODE */
 
+#  ifndef _BSIZE_T
+#    define _BSIZE_T
+#    if defined(_APP32_64BIT_OFF_T) || defined(_KERNEL)
+        typedef int64_t  sbsize_t;      /* signed length in bytes */
+        typedef uint64_t bsize_t;       /* unsigned length in bytes */
+#    else
+        typedef long  sbsize_t;
+        typedef unsigned long bsize_t;
+#    endif 
+#  endif /* _BSIZE_T */
+
 #ifdef _UNSUPPORTED
 
 	/* 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20021008/cd09a3b9/attachment.sig>


More information about the Gcc-patches mailing list