projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fdopen: Support for MSVC 9.
[gnulib.git]
/
tests
/
test-ptsname.c
diff --git
a/tests/test-ptsname.c
b/tests/test-ptsname.c
index
13596da
..
921367c
100644
(file)
--- a/
tests/test-ptsname.c
+++ b/
tests/test-ptsname.c
@@
-1,5
+1,5
@@
/* Test of ptsname(3).
/* Test of ptsname(3).
- Copyright (C) 2010 Free Software Foundation, Inc.
+ Copyright (C) 2010
-2011
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
@@
-22,6
+22,7
@@
SIGNATURE_CHECK (ptsname, char *, (int));
#include <fcntl.h>
SIGNATURE_CHECK (ptsname, char *, (int));
#include <fcntl.h>
+#include <signal.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
@@
-54,6
+55,13
@@
same_slave (const char *slave_name1, const char *slave_name2)
int
main (void)
{
int
main (void)
{
+#if HAVE_DECL_ALARM
+ /* Declare failure if test takes too long, by using default abort
+ caused by SIGALRM. */
+ signal (SIGALRM, SIG_DFL);
+ alarm (5);
+#endif
+
{
int fd;
char *result;
{
int fd;
char *result;