summaryrefslogtreecommitdiff
path: root/debug/tst-chk1.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2016-08-20 19:50:45 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-08-20 19:50:45 +0200
commit4dd9e35bfd35d3138bc44169baba098005bad51e (patch)
treea4939c43a9c3fe00eb27f023e14acc5e1fe8808c /debug/tst-chk1.c
parentbd42a4599d1b6f77bcfe1e4f67b7cbd9e1cb2dfd (diff)
parentf76453c31593957fec1a99b986bfa5506618b79c (diff)
Merge commit 'refs/top-bases/t/bigmem' into t/bigmem
Diffstat (limited to 'debug/tst-chk1.c')
-rw-r--r--debug/tst-chk1.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/debug/tst-chk1.c b/debug/tst-chk1.c
index f0b86a0aa6..53559e6bca 100644
--- a/debug/tst-chk1.c
+++ b/debug/tst-chk1.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004-2014 Free Software Foundation, Inc.
+/* Copyright (C) 2004-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2004.
@@ -20,7 +20,6 @@
#include <fcntl.h>
#include <locale.h>
#include <obstack.h>
-#include <paths.h>
#include <setjmp.h>
#include <signal.h>
#include <stdio.h>
@@ -119,23 +118,7 @@ int num2 = 987654;
static int
do_test (void)
{
- struct sigaction sa;
- sa.sa_handler = handler;
- sa.sa_flags = 0;
- sigemptyset (&sa.sa_mask);
-
- sigaction (SIGABRT, &sa, NULL);
-
- /* Avoid all the buffer overflow messages on stderr. */
- int fd = open (_PATH_DEVNULL, O_WRONLY);
- if (fd == -1)
- close (STDERR_FILENO);
- else
- {
- dup2 (fd, STDERR_FILENO);
- close (fd);
- }
- setenv ("LIBC_FATAL_STDERR_", "1", 1);
+ set_fortify_handler (handler);
struct A { char buf1[9]; char buf2[1]; } a;
struct wA { wchar_t buf1[9]; wchar_t buf2[1]; } wa;
@@ -1366,7 +1349,7 @@ do_test (void)
ret = 1;
}
- fd = posix_openpt (O_RDWR);
+ int fd = posix_openpt (O_RDWR);
if (fd != -1)
{
char enough[1000];