From d12e6a29548a123c1cd4b510bedcbe7dd335a62b Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 27 Jul 1998 03:37:38 +0000 Subject: update to ncurses-4.2-980725 --- lib/libcurses/lib_trace.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/libcurses/lib_trace.c') diff --git a/lib/libcurses/lib_trace.c b/lib/libcurses/lib_trace.c index 80b8f6619be..f2e4bff596e 100644 --- a/lib/libcurses/lib_trace.c +++ b/lib/libcurses/lib_trace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lib_trace.c,v 1.3 1998/07/23 21:19:38 millert Exp $ */ +/* $OpenBSD: lib_trace.c,v 1.4 1998/07/27 03:37:33 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998 Free Software Foundation, Inc. * @@ -40,7 +40,7 @@ #include #include -MODULE_ID("$From: lib_trace.c,v 1.27 1998/07/18 02:18:45 tom Exp $") +MODULE_ID("$From: lib_trace.c,v 1.29 1998/07/25 20:11:02 tom Exp $") #include #if HAVE_FCNTL_H @@ -61,12 +61,14 @@ void trace(const unsigned int tracelevel GCC_UNUSED) { #ifdef TRACE static bool been_here = FALSE; +static char my_name[] = "trace"; _nc_tracing = tracelevel; if (! been_here && tracelevel) { been_here = TRUE; - if ((tracefp = fopen("trace", "w")) == 0) { + if (_nc_access(my_name, W_OK) < 0 + || (tracefp = fopen(my_name, "w")) == 0) { perror("curses: Can't open 'trace' file: "); exit(EXIT_FAILURE); } -- cgit v1.2.3