Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Apr 2002 09:02:15 -0800 (PST)
From:      Dag-Erling Smorgrav <des@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 9213 for review
Message-ID:  <200204061702.g36H2FB19799@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=9213

Change 9213 by des@des.at.des.thinksec.com on 2002/04/06 09:02:06

	Fix bugs in portability code; libpam now builds on NetBSD 1.5.2.
	
	Sponsored by:	DARPA, NAI Labs

Affected files ...

... //depot/projects/openpam/include/security/openpam.h#14 edit

Differences ...

==== //depot/projects/openpam/include/security/openpam.h#14 (text+ko) ====

@@ -31,7 +31,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $P4: //depot/projects/openpam/include/security/openpam.h#13 $
+ * $P4: //depot/projects/openpam/include/security/openpam.h#14 $
  */
 
 #ifndef _SECURITY_OPENPAM_H_INCLUDED
@@ -117,19 +117,26 @@
 /*
  * Log to syslog
  */
-void _openpam_log(int _level,
+void
+_openpam_log(int _level,
 	const char *_func,
 	const char *_fmt,
 	...);
 
-#if defined(__STDC__) && (__STDC_VERSION__ > 199901L)
+#if defined(__STDC__) && (__STDC_VERSION__ >= 199901L)
 #define openpam_log(lvl, fmt, ...) \
 	_openpam_log((lvl), __func__, fmt, __VA_ARGS__)
-#elif defined(__GNUC__)
+#elif defined(__GNUC__) && (__GNUC__ >= 2) && (__GNUC_MINOR__ >= 95)
+#define openpam_log(lvl, fmt, ...) \
+	_openpam_log((lvl), __func__, fmt, ##fmt)
+#elif defined(__GNUC__) && defined(__FUNCTION__)
 #define openpam_log(lvl, fmt...) \
-	_openpam_log((lvl), __func__, ##fmt)
+	_openpam_log((lvl), __FUNCTION__, ##fmt)
 #else
-extern openpam_log(int _level, const char *_format, ...);
+void
+openpam_log(int _level,
+	const char *_format,
+	...);
 #endif
 
 /*
@@ -190,12 +197,14 @@
  * Infrastructure for static modules using GCC linker sets.
  * You are not expected to understand this.
  */
-#if defined(__GNUC__) && !defined(__PIC__)
 #if defined(__FreeBSD__)
 #define PAM_SOEXT ".so"
 #else
-#error Static linking is not supported on your platform
+#ifndef NO_STATIC_MODULES
+#define NO_STATIC_MODULES
+#endif
 #endif
+#if defined(__GNUC__) && !defined(__PIC__) && !defined(NO_STATIC_MODULES)
 /* gcc, static linking */
 #include <sys/cdefs.h>
 #include <linker_set.h>

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200204061702.g36H2FB19799>