add prototype for lseek to make programs casting second arg to off_t work
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Mon, 3 May 1993 02:12:24 +0000 (18:12 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Mon, 3 May 1993 02:12:24 +0000 (18:12 -0800)
SCCS-vsn: sys/sys/types.h 7.27

usr/src/sys/sys/types.h

index d195b03..2e54883 100644 (file)
@@ -4,7 +4,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)types.h     7.26 (Berkeley) %G%
+ *     @(#)types.h     7.27 (Berkeley) %G%
  */
 
 #ifndef _TYPES_H_
  */
 
 #ifndef _TYPES_H_
@@ -40,6 +40,18 @@ typedef      long            segsz_t;        /* segment size */
 typedef        long            swblk_t;        /* swap offset */
 typedef        unsigned long   uid_t;          /* user id */
 
 typedef        long            swblk_t;        /* swap offset */
 typedef        unsigned long   uid_t;          /* user id */
 
+/*
+ * This belongs in unistd.h, but is placed here to ensure that programs
+ * casting the second parameter of lseek to off_t will get the correct
+ * version of lseek.
+ */
+#ifndef KERNEL
+#define         lseek __lseek
+__BEGIN_DECLS
+off_t   lseek __P((int, off_t, int));
+__END_DECLS
+#endif
+
 #ifndef _POSIX_SOURCE
 #define        major(x)        ((int)(((u_int)(x) >> 8)&0xff)) /* major number */
 #define        minor(x)        ((int)((x)&0xff))               /* minor number */
 #ifndef _POSIX_SOURCE
 #define        major(x)        ((int)(((u_int)(x) >> 8)&0xff)) /* major number */
 #define        minor(x)        ((int)((x)&0xff))               /* minor number */