maint: update copyright
[gnulib.git] / lib / pwrite.c
index d5348c1..a759204 100644 (file)
@@ -1,6 +1,6 @@
 /* Write block to given position in file without changing file pointer.
    POSIX version.
-   Copyright (C) 1997-1999, 2002, 2011 Free Software Foundation, Inc.
+   Copyright (C) 1997-1999, 2002, 2011-2014 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
 
 #include <errno.h>
 
-#if HAVE_PWRITE
-
-ssize_t
-pwrite (int fd, const void *buf, size_t nbyte, off_t offset)
-# undef pwrite
-{
-  if (offset < 0)
-    {
-      errno = EINVAL;
-      return -1;
-    }
-  return pwrite (fd, buf, nbyte, offset);
-}
-
-#else
-
-# define __libc_lseek(f,o,w) lseek (f, o, w)
-# define __set_errno(Val) errno = (Val)
-# define __libc_write(f,b,n) write (f, b, n)
+#define __libc_lseek(f,o,w) lseek (f, o, w)
+#define __set_errno(Val) errno = (Val)
+#define __libc_write(f,b,n) write (f, b, n)
 
 /* Note: This implementation of pwrite is not multithread-safe.  */
 
@@ -78,5 +62,3 @@ pwrite (int fd, const void *buf, size_t nbyte, off_t offset)
 
   return result;
 }
-
-#endif