Module Name:    othersrc
Committed By:   dholland
Date:           Mon Feb 25 03:12:21 UTC 2013

Modified Files:
        othersrc/usr.bin/dholland-make2: portable.h

Log Message:
Add MAKE_RCSID macro.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 othersrc/usr.bin/dholland-make2/portable.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: othersrc/usr.bin/dholland-make2/portable.h
diff -u othersrc/usr.bin/dholland-make2/portable.h:1.3 othersrc/usr.bin/dholland-make2/portable.h:1.4
--- othersrc/usr.bin/dholland-make2/portable.h:1.3	Mon Feb 25 03:08:10 2013
+++ othersrc/usr.bin/dholland-make2/portable.h	Mon Feb 25 03:12:21 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: portable.h,v 1.3 2013/02/25 03:08:10 dholland Exp $	*/
+/*	$NetBSD: portable.h,v 1.4 2013/02/25 03:12:21 dholland Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -105,6 +105,7 @@
  *    MAKE_ATTR_UNUSED		attribute for unused objects
  *    MAKE_ATTR_DEAD		attribute for noreturn functions
  *    MAKE_ATTR_PRINTFLIKE	attribute for printf functions
+ *    MAKE_RCSID		macro for holding rcsid strings
  *    UNCONST(p)		macro for discarding const
  *    MIN(a, b), MAX(a, b)
  *    bmake_malloc		allocator functions that crash on error
@@ -125,12 +126,12 @@
 #ifndef PORTABLE_H
 #define PORTABLE_H
 
-#include <stddef.h>	/* for size_t */
-
-#ifdef BSD4_4
-# include <sys/cdefs.h>
+#ifdef MAKE_NATIVE
+#include <sys/cdefs.h>
 #endif
 
+#include <stddef.h>	/* for size_t */
+
 #if defined(__GNUC__)
 #define	MAKE_GNUC_PREREQ(x, y)						\
 	((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) ||			\
@@ -160,6 +161,12 @@
 #define MAKE_ATTR_PRINTFLIKE(fmtarg, firstvararg)	/* delete */
 #endif
 
+#ifdef MAKE_NATIVE
+#define MAKE_RCSID	__RCSID
+#else
+#define MAKE_RCSID(str)
+#endif
+
 #ifdef __GNUC__
 #define UNCONST(ptr)	({ 		\
     union __unconst {			\

Reply via email to