projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
progname: also set global program_invocation_name, when possible.
[gnulib.git]
/
tests
/
test-poll.c
diff --git
a/tests/test-poll.c
b/tests/test-poll.c
index
b0cdb60
..
d78698e
100644
(file)
--- a/
tests/test-poll.c
+++ b/
tests/test-poll.c
@@
-1,5
+1,5
@@
/* Test of poll() function.
/* Test of poll() function.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008
-2009
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-28,8
+28,8
@@
#include <fcntl.h>
#include <stdlib.h>
#include <stdbool.h>
#include <fcntl.h>
#include <stdlib.h>
#include <stdbool.h>
+#include <sys/ioctl.h>
#include <errno.h>
#include <errno.h>
-#include "sockets.h"
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
# define WIN32_NATIVE
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
# define WIN32_NATIVE
@@
-130,10
+130,10
@@
connect_to_socket (int blocking)
#ifdef WIN32_NATIVE
unsigned long iMode = 1;
ioctl (s, FIONBIO, (char *) &iMode);
#ifdef WIN32_NATIVE
unsigned long iMode = 1;
ioctl (s, FIONBIO, (char *) &iMode);
-
+
#elif defined F_GETFL
int oldflags = fcntl (s, F_GETFL, NULL);
#elif defined F_GETFL
int oldflags = fcntl (s, F_GETFL, NULL);
-
+
if (!(oldflags & O_NONBLOCK))
fcntl (s, F_SETFL, oldflags | O_NONBLOCK);
#endif
if (!(oldflags & O_NONBLOCK))
fcntl (s, F_SETFL, oldflags | O_NONBLOCK);
#endif
@@
-161,7
+161,7
@@
poll1 (int fd, int ev, int time)
pfd.fd = fd;
pfd.events = ev;
pfd.revents = 0;
pfd.fd = fd;
pfd.events = ev;
pfd.revents = 0;
- r = poll (&pfd, 1, time);
+ r = poll (&pfd, 1, time);
if (r < 0)
return r;
if (r < 0)
return r;
@@
-359,8
+359,6
@@
main ()
{
int result;
{
int result;
- gl_sockets_startup (SOCKETS_1_1);
-
#ifdef INTERACTIVE
printf ("Please press Enter\n");
test (test_tty, "TTY");
#ifdef INTERACTIVE
printf ("Please press Enter\n");
test (test_tty, "TTY");