about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog17
-rw-r--r--libio/iofgetpos64.c20
-rw-r--r--libio/stdio.h29
-rw-r--r--sysdeps/unix/sysv/linux/hppa/syscalls.list1
4 files changed, 47 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index 5946d61b99..4cb3b12c6f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2003-08-28  Carlos O'Donell  <carlos@baldric.uwo.ca>
+
+	* sysdeps/unix/sysv/linux/hppa/syscalls.list: Add semtimedop.
+
+2003-08-29  Jakub Jelinek  <jakub@redhat.com>
+
+	* libio/iofgetpos64.c (_IO_new_fgetpos64): Move lock release to the
+	end.
+
+2003-08-29  Ulrich Drepper  <drepper@redhat.com>
+
+	* libio/stdio.h: Remove a few more __THROW.
+
 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
 
 	* libio/Makefile: Compile fputc.c, fputwc.c, freopen64.c, freopen.c,
@@ -33,8 +46,8 @@
 	* libio/iofgetpos.c (_IO_new_fgetpos): Likewise.
 	* libio/iofgets.c (_IO_fgets): Likewise.
 	* libio/iofgetws.c (fgetws): Likewise.
-	* libio/iofputs.c (_IO_fputs):
-	* libio/iofputws.c (_IO_fputs): Likewise.
+	* libio/iofputs.c (_IO_fputs): Likewise.
+	* libio/iofputws.c (fputws): Likewise.
 	* libio/iofread.c (_IO_fread): Likewise.
 	* libio/iofsetpos64.c (_IO_new_fsetpos64): Likewise.
 	* libio/iofsetpos.c (_IO_new_fsetpos): Likewise.
diff --git a/libio/iofgetpos64.c b/libio/iofgetpos64.c
index 029556f8cd..be224ca103 100644
--- a/libio/iofgetpos64.c
+++ b/libio/iofgetpos64.c
@@ -37,6 +37,7 @@ _IO_new_fgetpos64 (fp, posp)
 {
 #ifdef _G_LSEEK64
   _IO_off64_t pos;
+  int result = 0;
   CHECK_FILE (fp, EOF);
   _IO_acquire_lock (fp);
   pos = _IO_seekoff_unlocked (fp, 0, _IO_seek_cur, 0);
@@ -45,7 +46,6 @@ _IO_new_fgetpos64 (fp, posp)
       if (fp->_mode <= 0)
 	pos -= fp->_IO_save_end - fp->_IO_save_base;
     }
-  _IO_release_lock (fp);
   if (pos == _IO_pos_BAD)
     {
       /* ANSI explicitly requires setting errno to a positive value on
@@ -54,14 +54,18 @@ _IO_new_fgetpos64 (fp, posp)
       if (errno == 0)
 	__set_errno (EIO);
 # endif
-      return EOF;
+      result = EOF;
+    }
+  else
+    {
+      posp->__pos = pos;
+      if (fp->_mode > 0
+	  && (*fp->_codecvt->__codecvt_do_encoding) (fp->_codecvt) < 0)
+	/* This is a stateful encoding, safe the state.  */
+	posp->__state = fp->_wide_data->_IO_state;
     }
-  posp->__pos = pos;
-  if (fp->_mode > 0
-      && (*fp->_codecvt->__codecvt_do_encoding) (fp->_codecvt) < 0)
-    /* This is a stateful encoding, safe the state.  */
-    posp->__state = fp->_wide_data->_IO_state;
-  return 0;
+  _IO_release_lock (fp);
+  return result;
 #else
   __set_errno (ENOSYS);
   return EOF;
diff --git a/libio/stdio.h b/libio/stdio.h
index 88ef61b029..140643911f 100644
--- a/libio/stdio.h
+++ b/libio/stdio.h
@@ -470,9 +470,12 @@ __BEGIN_NAMESPACE_STD
 /* Write a character to STREAM.
 
    These functions are possible cancellation points and therefore not
+   marked with __THROW.
+
+   These functions is a possible cancellation point and therefore not
    marked with __THROW.  */
-extern int fputc (int __c, FILE *__stream) __THROW;
-extern int putc (int __c, FILE *__stream) __THROW;
+extern int fputc (int __c, FILE *__stream);
+extern int putc (int __c, FILE *__stream);
 
 /* Write a character to stdout.
 
@@ -508,10 +511,10 @@ extern int putchar_unlocked (int __c);
 #if defined __USE_SVID || defined __USE_MISC \
     || (defined __USE_XOPEN && !defined __USE_XOPEN2K)
 /* Get a word (int) from STREAM.  */
-extern int getw (FILE *__stream) __THROW;
+extern int getw (FILE *__stream);
 
 /* Write a word (int) to STREAM.  */
-extern int putw (int __w, FILE *__stream) __THROW;
+extern int putw (int __w, FILE *__stream);
 #endif
 
 
@@ -626,9 +629,9 @@ extern int fputs_unlocked (__const char *__restrict __s,
    or due to the implementation they are cancellation points and
    therefore not marked with __THROW.  */
 extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
-			      size_t __n, FILE *__restrict __stream) __THROW;
+			      size_t __n, FILE *__restrict __stream);
 extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
-			       size_t __n, FILE *__restrict __stream) __THROW;
+			       size_t __n, FILE *__restrict __stream);
 #endif
 
 
@@ -757,11 +760,17 @@ extern int fileno_unlocked (FILE *__stream) __THROW;
 
 #if (defined __USE_POSIX2 || defined __USE_SVID  || defined __USE_BSD || \
      defined __USE_MISC)
-/* Create a new stream connected to a pipe running the given command.  */
-extern FILE *popen (__const char *__command, __const char *__modes) __THROW;
+/* Create a new stream connected to a pipe running the given command.
+
+   This function is a possible cancellation point and therefore not
+   marked with __THROW.  */
+extern FILE *popen (__const char *__command, __const char *__modes);
 
-/* Close a stream opened by popen and return the status of its child.  */
-extern int pclose (FILE *__stream) __THROW;
+/* Close a stream opened by popen and return the status of its child.
+
+   This function is a possible cancellation point and therefore not
+   marked with __THROW.  */
+extern int pclose (FILE *__stream);
 #endif
 
 
diff --git a/sysdeps/unix/sysv/linux/hppa/syscalls.list b/sysdeps/unix/sysv/linux/hppa/syscalls.list
index bc977e2e30..0f7537c306 100644
--- a/sysdeps/unix/sysv/linux/hppa/syscalls.list
+++ b/sysdeps/unix/sysv/linux/hppa/syscalls.list
@@ -10,6 +10,7 @@ shmctl		-	shmctl		i:iip	__shmctl	shmctl
 shmdt		-	shmdt		i:s	__shmdt		shmdt
 shmget		-	shmget		i:iii	__shmget	shmget
 semop		-	semop		i:ipi	__semop		semop
+semtimedop      -       semtimedop      i:ipip  semtimedop
 semget		-	semget		i:iii	__semget	semget
 semctl		-	semctl		i:iiii	__semctl	semctl