about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--inet/netinet/in.h4
-rw-r--r--nptl/ChangeLog5
-rw-r--r--nptl/sysdeps/pthread/tst-timer.c74
-rw-r--r--sysdeps/unix/sysv/linux/sys/epoll.h6
5 files changed, 78 insertions, 19 deletions
diff --git a/ChangeLog b/ChangeLog
index dda274cb23..3064149b09 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2003-03-24  Jon Grimm  <jgrimm@us.ibm.com>
+
+	* inet/netinet/in.h: Add IPPROTO_SCTP.
+
+2003-03-24  Ulrich Drepper  <drepper@redhat.com>
+
+	* sysdeps/unix/sysv/linux/sys/epoll.h (EPOLLET): Define.
+
 2003-03-24  Philip Blundell  <philb@gnu.org>
 
 	* sysdeps/unix/sysv/linux/arm/sysdep.h (INTERNAL_SYSCALL):
diff --git a/inet/netinet/in.h b/inet/netinet/in.h
index 26be9ea751..a87f35e99a 100644
--- a/inet/netinet/in.h
+++ b/inet/netinet/in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1999, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1999, 2000, 2001, 2003 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
@@ -79,6 +79,8 @@ enum
 #define IPPROTO_PIM		IPPROTO_PIM
     IPPROTO_COMP = 108,	   /* Compression Header Protocol.  */
 #define IPPROTO_COMP		IPPROTO_COMP
+    IPPROTO_SCTP = 132,	   /* Stream Control Transmission Protocol.  */
+#define IPPROTO_SCTP		IPPROTO_SCTP
     IPPROTO_RAW = 255,	   /* Raw IP packets.  */
 #define IPPROTO_RAW		IPPROTO_RAW
     IPPROTO_MAX
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 2c8c1423a0..fe24582b91 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,8 @@
+2003-03-24  Ulrich Drepper  <drepper@redhat.com>
+
+	* sysdeps/pthread/tst-timer.c: Check return values of the
+	functions we test.
+
 2003-03-23  Roland McGrath  <roland@redhat.com>
 
 	* tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
diff --git a/nptl/sysdeps/pthread/tst-timer.c b/nptl/sysdeps/pthread/tst-timer.c
index 7417bcd5f0..54d6b6ae93 100644
--- a/nptl/sysdeps/pthread/tst-timer.c
+++ b/nptl/sysdeps/pthread/tst-timer.c
@@ -1,5 +1,5 @@
 /* Tests for POSIX timer implementation.
-   Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Kaz Kylheku <kaz@ashi.footprints.net>.
 
@@ -26,9 +26,16 @@
 
 
 static void
-notify_func (union sigval sigval)
+notify_func1 (union sigval sigval)
 {
-  puts ("notify_func");
+  puts ("notify_func1");
+}
+
+
+static void
+notify_func2 (union sigval sigval)
+{
+  puts ("notify_func2");
 }
 
 
@@ -75,7 +82,7 @@ main (void)
   retval = clock_gettime (CLOCK_REALTIME, &ts);
 
   sigev2.sigev_notify = SIGEV_THREAD;
-  sigev2.sigev_notify_function = notify_func;
+  sigev2.sigev_notify_function = notify_func1;
   sigev2.sigev_notify_attributes = NULL;
 
   setvbuf (stdout, 0, _IOLBF, 0);
@@ -88,27 +95,62 @@ main (void)
   printf ("clock_getres returned %d, timespec = { %ld, %ld }\n",
 	  retval, ts.tv_sec, ts.tv_nsec);
 
-  timer_create (CLOCK_REALTIME, &sigev1, &timer_sig);
-  timer_create (CLOCK_REALTIME, &sigev2, &timer_thr1);
-  timer_create (CLOCK_REALTIME, &sigev2, &timer_thr2);
-
-  timer_settime (timer_thr1, 0, &itimer2, &old);
-  timer_settime (timer_thr2, 0, &itimer3, &old);
+  if (timer_create (CLOCK_REALTIME, &sigev1, &timer_sig) != 0)
+    {
+      printf ("timer_create for timer_sig failed: %m\n");
+      exit (1);
+    }
+  if (timer_create (CLOCK_REALTIME, &sigev2, &timer_thr1) != 0)
+    {
+      printf ("timer_create for timer_thr1 failed: %m\n");
+      exit (1);
+    }
+  sigev2.sigev_notify_function = notify_func2;
+  if (timer_create (CLOCK_REALTIME, &sigev2, &timer_thr2) != 0)
+    {
+      printf ("timer_create for timer_thr2 failed: %m\n");
+      exit (1);
+    }
+
+  if (timer_settime (timer_thr1, 0, &itimer2, &old) != 0)
+    {
+      printf ("timer_settime for timer_thr1 failed: %m\n");
+      exit (1);
+    }
+  if (timer_settime (timer_thr2, 0, &itimer3, &old) != 0)
+    {
+      printf ("timer_settime for timer_thr2 failed: %m\n");
+      exit (1);
+    }
 
   signal (ZSIGALRM, signal_func);
 
-  timer_settime (timer_sig, 0, &itimer1, &old);
-
-  timer_delete (-1);
+  if (timer_settime (timer_sig, 0, &itimer1, &old) != 0)
+    {
+      printf ("timer_settime for timer_sig failed: %m\n");
+      exit (1);
+    }
 
   intr_sleep (3);
 
-  timer_delete (timer_sig);
-  timer_delete (timer_thr1);
+  if (timer_delete (timer_sig) != 0)
+    {
+      printf ("timer_delete for timer_sig failed: %m\n");
+      exit (1);
+    }
+  if (timer_delete (timer_thr1) != 0)
+    {
+      printf ("timer_delete for timer_thr1 failed: %m\n");
+      exit (1);
+    }
 
   intr_sleep (3);
 
-  timer_delete (timer_thr2);
+  if (timer_delete (timer_thr2) != 0)
+    {
+      printf ("timer_delete for timer_thr2 failed: %m\n");
+      exit (1);
+    }
 
   return 0;
 }
diff --git a/sysdeps/unix/sysv/linux/sys/epoll.h b/sysdeps/unix/sysv/linux/sys/epoll.h
index 1add423ce1..8864305ced 100644
--- a/sysdeps/unix/sysv/linux/sys/epoll.h
+++ b/sysdeps/unix/sysv/linux/sys/epoll.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003 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
@@ -42,8 +42,10 @@ enum EPOLL_EVENTS
 #define EPOLLMSG EPOLLMSG
     EPOLLERR = 0x008,
 #define EPOLLERR EPOLLERR
-    EPOLLHUP = 0x010
+    EPOLLHUP = 0x010,
 #define EPOLLHUP EPOLLHUP
+    EPOLLET = (1 << 31)
+#define EPOLLET EPOLLET
   };