Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/include Add a macro __MKTEMP_OK__ that renames mktemp() to _...



details:   https://anonhg.NetBSD.org/src/rev/cf7359e0a085
branches:  trunk
changeset: 581955:cf7359e0a085
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Jun 11 22:58:42 2005 +0000

description:
Add a macro __MKTEMP_OK__ that renames mktemp() to _mktemp() for uses that
have been checked, so that the linker does not warn us. There are valid
uses for mktemp() such as for creating filenames that are going to be
targets of the rename system call. Discussed with lukem.

diffstat:

 include/stdlib.h |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (23 lines):

diff -r 9f4db89c0a21 -r cf7359e0a085 include/stdlib.h
--- a/include/stdlib.h  Sat Jun 11 22:54:43 2005 +0000
+++ b/include/stdlib.h  Sat Jun 11 22:58:42 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: stdlib.h,v 1.69 2005/02/03 04:39:32 perry Exp $        */
+/*     $NetBSD: stdlib.h,v 1.70 2005/06/11 22:58:42 christos Exp $     */
 
 /*-
  * Copyright (c) 1990, 1993
@@ -179,9 +179,11 @@
 
 char   *mkdtemp(char *);
 int     mkstemp(char *);
-#ifndef __AUDIT__
-char   *mktemp(char *);
+char   *mktemp(char *)
+#ifdef __MKTEMP_OK__
+       __RENAME(_mktemp)
 #endif
+       ;
 
 int     setkey(const char *);
 



Home | Main Index | Thread Index | Old Index