summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/sparc
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/sparc')
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/fcntl.h80
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/ioctls.h8
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h23
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h6
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/setjmp.S13
5 files changed, 86 insertions, 44 deletions
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h b/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
index ca4d34c14e..9e8c589b9a 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
@@ -24,8 +24,8 @@
/* In GNU, read and write are bits (unlike BSD). */
#ifdef __USE_GNU
-#define O_READ O_RDONLY /* Open for reading. */
-#define O_WRITE O_WRONLY /* Open for writing. */
+# define O_READ O_RDONLY /* Open for reading. */
+# define O_WRITE O_WRONLY /* Open for writing. */
#endif
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
@@ -44,24 +44,35 @@
#define O_NDELAY (0x0004 | O_NONBLOCK)
#define O_NOCTTY 0x8000 /* not fcntl */
-#define F_DUPFD 0 /* dup */
-#define F_GETFD 1 /* get f_flags */
-#define F_SETFD 2 /* set f_flags */
-#define F_GETFL 3 /* more flags (cloexec) */
-#define F_SETFL 4
-#define F_GETOWN 5 /* for sockets. */
-#define F_SETOWN 6 /* for sockets. */
-#define F_GETLK 7
-#define F_SETLK 8
-#define F_SETLKW 9
+/* XXX missing */
+#define O_LARGEFILE 0
+
+/* Values for the second argument to `fcntl'. */
+#define F_DUPFD 0 /* Duplicate file descriptor. */
+#define F_GETFD 1 /* Get file descriptor flags. */
+#define F_SETFD 2 /* Set file descriptor flags. */
+#define F_GETFL 3 /* Get file status flags. */
+#define F_SETFL 4 /* Set file status flags. */
+#ifdef __USE_BSD
+# define F_GETOWN 5 /* Get owner of socket (receiver of SIGIO). */
+# define F_SETOWN 6 /* Set owner of socket (receiver of SIGIO). */
+#endif
+#define F_GETLK 7 /* Get record locking info. */
+#define F_SETLK 8 /* Set record locking info (non-blocking). */
+#define F_SETLKW 9 /* Set record locking info (blocking). */
+
+/* XXX missing */
+#define F_GETLK64 7 /* Get record locking info. */
+#define F_SETLK64 8 /* Set record locking info (non-blocking). */
+#define F_SETLKW64 9 /* Set record locking info (blocking). */
/* for F_[GET|SET]FL */
#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
-/* for posix fcntl() and lockf() */
-#define F_RDLCK 1
-#define F_WRLCK 2
-#define F_UNLCK 3
+/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
+#define F_RDLCK 1 /* Read lock. */
+#define F_WRLCK 2 /* Write lock. */
+#define F_UNLCK 3 /* Remove lock. */
/* for old implementation of bsd flock () */
#define F_EXLCK 4 /* or 3 */
@@ -76,22 +87,39 @@
struct flock
{
- short int l_type;
- short int l_whence;
- __off_t l_start;
- __off_t l_len;
- __pid_t l_pid;
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+#ifndef __USE_FILE_OFFSET64
+ __off_t l_start; /* Offset where the lock begins. */
+ __off_t l_len; /* Size of the locked area; zero means until EOF. */
+#else
+ __off64_t l_start; /* Offset where the lock begins. */
+ __off64_t l_len; /* Size of the locked area; zero means until EOF. */
+#endif
+ __pid_t l_pid; /* Process holding the lock. */
short int __unused;
};
+#ifdef __USE_LARGEFILE64
+struct flock64
+ {
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+ __off64_t l_start; /* Offset where the lock begins. */
+ __off64_t l_len; /* Size of the locked area; zero means until EOF. */
+ __pid_t l_pid; /* Process holding the lock. */
+ short int __unused;
+ };
+#endif
+
/* Define some more compatibility macros to be backward compatible with
BSD systems which did not managed to hide these kernel macros. */
#ifdef __USE_BSD
-#define FAPPEND O_APPEND
-#define FFSYNC O_FSYNC
-#define FASYNC O_ASYNC
-#define FNONBLOCK O_NONBLOCK
-#define FNDELAY O_NDELAY
+# define FAPPEND O_APPEND
+# define FFSYNC O_FSYNC
+# define FASYNC O_ASYNC
+# define FNONBLOCK O_NONBLOCK
+# define FNDELAY O_NDELAY
#endif /* Use BSD. */
#endif
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/ioctls.h b/sysdeps/unix/sysv/linux/sparc/bits/ioctls.h
index 46867d8e41..b33493ee46 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/ioctls.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/ioctls.h
@@ -33,10 +33,10 @@
#undef TCSETS
#undef TCSETSW
#undef TCSETSF
-#define TCGETS _IOR ('T', 8, struct __kernel_termios)
-#define TCSETS _IOW ('T', 9, struct __kernel_termios)
-#define TCSETSW _IOW ('T', 10, struct __kernel_termios)
-#define TCSETSF _IOW ('T', 11, struct __kernel_termios)
+#define TCGETS _IOR ('T', 8, char[36])
+#define TCSETS _IOW ('T', 9, char[36])
+#define TCSETSW _IOW ('T', 10, char[36])
+#define TCSETSF _IOW ('T', 11, char[36])
#include <linux/sockios.h>
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h b/sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h
index 462f7c2998..a417928863 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h
@@ -27,9 +27,9 @@
/* Convenience types. */
typedef unsigned char __u_char;
-typedef unsigned short __u_short;
+typedef unsigned short int __u_short;
typedef unsigned int __u_int;
-typedef unsigned long __u_long;
+typedef unsigned long int __u_long;
typedef unsigned long int __u_quad_t;
typedef long int __quad_t;
typedef signed char __int8_t;
@@ -45,13 +45,15 @@ typedef __quad_t *__qaddr_t;
typedef __u_long __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_int __ino_t; /* Type of file serial numbers. */
+typedef __u_long __ino_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 __quad_t __loff_t; /* Type of file sizes and offsets. */
typedef int __pid_t; /* Type of process identifications. */
typedef long long int __ssize_t; /* Type of a byte count, or error. */
+typedef long int __rlim_t; /* Type of resource counts. */
+typedef long int __rlim64_t; /* Type of resource counts (LFS). */
typedef struct
{
@@ -92,4 +94,19 @@ typedef struct
typedef int __key_t;
+
+/* Types from the Large File Support interface. */
+
+/* Type to count number os disk blocks. */
+typedef long int __blkcnt_t;
+typedef __quad_t __blkcnt64_t;
+
+/* Type to count file system blocks. */
+typedef unsigned int __fsblkcnt_t;
+typedef __u_quad_t __fsblkcnt64_t;
+
+/* Type to count file system inodes. */
+typedef unsigned long int __fsfilcnt_t;
+typedef __u_quad_t __fsfilcnt64_t;
+
#endif /* bits/types.h */
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h b/sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h
index fcb752e3ec..dd509a7e8a 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h
@@ -2,7 +2,7 @@
struct kernel_stat
{
unsigned int st_dev;
- unsigned int st_ino;
+ unsigned long int st_ino;
unsigned int st_mode;
short int st_nlink;
unsigned int st_uid;
@@ -18,5 +18,5 @@ struct kernel_stat
unsigned long int __unused2;
};
-#define _HAVE___UNUSED1
-#define _HAVE___UNUSED2
+#define _HAVE___UNUSED1
+#define _HAVE___UNUSED2
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/setjmp.S b/sysdeps/unix/sysv/linux/sparc/sparc64/setjmp.S
index fcc5cb5a48..65a1d34836 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/setjmp.S
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/setjmp.S
@@ -29,21 +29,15 @@
/* int _setjmp(jmp_buf) */
-.weak _setjmp
-ENTRY(_setjmp)
-
+ENTRY(__setjmp)
ba __sigsetjmp_local
set 0, %o1
-
-END(setjmp)
+END(__setjmp)
/* int setjmp(jmp_buf) */
-.weak setjmp
ENTRY(setjmp)
-
set 1, %o1
-
END(setjmp)
/* int __sigsetjmp(jmp_buf, savemask) */
@@ -65,3 +59,6 @@ __sigsetjmp_local:
mov %g1, %o0
END(__sigsetjmp)
+
+weak_alias(__setjmp, _setjmp)
+weak_extern(setjmp)