about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h')
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h50
1 files changed, 45 insertions, 5 deletions
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h b/sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h
index b6d98853ea..9ecba2ddcf 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 94, 95, 96, 97, 98, 99 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -27,38 +27,66 @@
 
 #define __need_size_t
 #include <stddef.h>
+#include <bits/wordsize.h>
 
 /* Convenience types.  */
 typedef unsigned char __u_char;
 typedef unsigned short int __u_short;
 typedef unsigned int __u_int;
 typedef unsigned long int __u_long;
+#if __WORDSIZE == 64
 typedef unsigned long int __u_quad_t;
 typedef long int __quad_t;
+#else
+#ifdef __GNUC__
+__extension__ typedef unsigned long long int __u_quad_t;
+__extension__ typedef long long int __quad_t;
+#else
+typedef struct
+  {
+    long int __val[2];
+  } __quad_t;
+typedef struct
+  {
+    __u_long __val[2];
+  } __u_quad_t;
+#endif
+#endif
 typedef signed char __int8_t;
 typedef unsigned char __uint8_t;
 typedef signed short int __int16_t;
 typedef unsigned short int __uint16_t;
 typedef signed int __int32_t;
 typedef unsigned int __uint32_t;
+#if __WORDSIZE == 64
 typedef signed long int __int64_t;
 typedef unsigned long int __uint64_t;
 typedef __quad_t *__qaddr_t;
+#else
+#ifdef __GNUC__
+__extension__ typedef signed long long int __int64_t;
+__extension__ typedef unsigned long long int __uint64_t;
+#endif
+#endif
 
-typedef __u_long __dev_t;		/* Type of device numbers.  */
+typedef __u_quad_t __dev_t;		/* Type of device numbers.  */
 typedef __u_int __uid_t;		/* Type of user identifications.  */
 typedef __u_int __gid_t;		/* Type of group identifications.  */
 typedef __u_long __ino_t;		/* Type of file serial numbers.  */
-typedef __u_long __ino64_t;		/* Type of file serial numbers.  */
+typedef __uint64_t __ino64_t;		/* Type of file serial numbers.  */
 typedef __u_int __mode_t;		/* Type of file attribute bitmasks.  */
 typedef __u_int __nlink_t; 		/* Type of file link counts.  */
 typedef long int __off_t;		/* Type of file sizes and offsets.  */
 typedef __int64_t  __off64_t;		/*  "" (LFS) */
 typedef __quad_t __loff_t;		/* Type of file sizes and offsets.  */
 typedef int __pid_t;			/* Type of process identifications.  */
+#if __WORDSIZE == 64
 typedef long long int __ssize_t;	/* Type of a byte count, or error.  */
+#else
+typedef int __ssize_t;			/* Type of a byte count, or error.  */
+#endif
 typedef long int __rlim_t;		/* Type of resource counts.  */
-typedef long int __rlim64_t;		/* Type of resource counts (LFS).  */
+typedef __quad_t __rlim64_t;		/* Type of resource counts (LFS).  */
 typedef __u_int __id_t;			/* General type for IDs.  */
 
 typedef struct
@@ -108,7 +136,11 @@ typedef struct
 typedef int __key_t;
 
 /* Used in `struct shmid_ds'.  */
-typedef int __ipc_pid_t;
+#if __WORDSIZE == 64
+typedef int       __ipc_pid_t;
+#else
+typedef short int __ipc_pid_t;
+#endif
 
 
 /* Types from the Large File Support interface.  */
@@ -118,7 +150,11 @@ typedef long int __blkcnt_t;
 typedef __quad_t __blkcnt64_t;
 
 /* Type to count file system blocks.  */
+#if __WORDSIZE == 64
+typedef __u_long     __fsblkcnt_t;
+#else
 typedef unsigned int __fsblkcnt_t;
+#endif
 typedef __u_quad_t __fsblkcnt64_t;
 
 /* Type to count file system inodes.  */
@@ -130,7 +166,11 @@ typedef int __t_scalar_t;
 typedef unsigned int __t_uscalar_t;
 
 /* Duplicates info from stdint.h but this is used in unistd.h.  */
+#if __WORDSIZE == 64
 typedef long int __intptr_t;
+#else
+typedef int      __intptr_t;
+#endif
 
 
 /* Now add the thread types.  */