Changeset View
Changeset View
Standalone View
Standalone View
contrib/netbsd-tests/lib/libc/ssp/h_gets.c
Show All 28 Lines | |||||
#include <sys/cdefs.h> | #include <sys/cdefs.h> | ||||
__COPYRIGHT("@(#) Copyright (c) 2008\ | __COPYRIGHT("@(#) Copyright (c) 2008\ | ||||
The NetBSD Foundation, inc. All rights reserved."); | The NetBSD Foundation, inc. All rights reserved."); | ||||
__RCSID("$NetBSD: h_gets.c,v 1.1 2010/12/27 02:04:19 pgoyette Exp $"); | __RCSID("$NetBSD: h_gets.c,v 1.1 2010/12/27 02:04:19 pgoyette Exp $"); | ||||
#include <stdio.h> | #include <stdio.h> | ||||
#ifdef __FreeBSD__ | #ifdef __FreeBSD__ | ||||
#ifdef _FORTIFY_SOURCE | |||||
des: What if it's defined to 0? | |||||
Done Inline ActionsMeh, why not just #undef it unconditionally? We're not bringing gets() back, and if we do as a macro then it's still going to blow up the below __sym_compat kevans: Meh, why not just `#undef` it unconditionally? We're not bringing gets() back, and if we do as… | |||||
#undef gets | |||||
#endif | |||||
/* | /* | ||||
* We want to test the gets() implementation, but cannot simply link against | * We want to test the gets() implementation, but cannot simply link against | ||||
* the gets symbol because it is not in the default version. (We've made it | * the gets symbol because it is not in the default version. (We've made it | ||||
* unavailable by default on FreeBSD because it should not be used.) | * unavailable by default on FreeBSD because it should not be used.) | ||||
* | * | ||||
* The next two lines create an unsafe_gets() function that resolves to | * The next two lines create an unsafe_gets() function that resolves to | ||||
* gets@FBSD_1.0, which we call from our local gets() implementation. | * gets@FBSD_1.0, which we call from our local gets() implementation. | ||||
*/ | */ | ||||
Show All 17 Lines |
What if it's defined to 0?