Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/ypbind __CONCAT does token pasting, not string conc...



details:   https://anonhg.NetBSD.org/src/rev/87b8d072b460
branches:  trunk
changeset: 500891:87b8d072b460
user:      cgd <cgd%NetBSD.org@localhost>
date:      Wed Dec 20 01:34:39 2000 +0000

description:
__CONCAT does token pasting, not string concatnation.  if something like:
        __CONCAT("foo","bar");
actually works to concantate strings, it's because the preprocessor expands
it into "foo""bar" as separate strings, and then ANSI string concatenation
is performed on that.  It's more straightforward to just use ANSI string
concatenation directly, and newer GCCs complain (rightly) about misuse
of token pasting.

diffstat:

 usr.sbin/ypbind/ypbind.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r d74419da9a4d -r 87b8d072b460 usr.sbin/ypbind/ypbind.c
--- a/usr.sbin/ypbind/ypbind.c  Wed Dec 20 01:30:26 2000 +0000
+++ b/usr.sbin/ypbind/ypbind.c  Wed Dec 20 01:34:39 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ypbind.c,v 1.43 2000/10/11 20:23:58 is Exp $   */
+/*     $NetBSD: ypbind.c,v 1.44 2000/12/20 01:34:39 cgd Exp $  */
 
 /*
  * Copyright (c) 1992, 1993 Theo de Raadt <deraadt%fsa.ca@localhost>
@@ -34,7 +34,7 @@
 
 #include <sys/cdefs.h>
 #ifndef LINT
-__RCSID("$NetBSD: ypbind.c,v 1.43 2000/10/11 20:23:58 is Exp $");
+__RCSID("$NetBSD: ypbind.c,v 1.44 2000/12/20 01:34:39 cgd Exp $");
 #endif
 
 #include <sys/param.h>
@@ -84,7 +84,7 @@
 #define BUFSIZE                1400
 
 #define YPSERVERSSUFF  ".ypservers"
-#define BINDINGDIR     __CONCAT(_PATH_VAR_YP, "binding")
+#define BINDINGDIR     (_PATH_VAR_YP "binding")
 
 struct _dom_binding {
        struct _dom_binding *dom_pnext;



Home | Main Index | Thread Index | Old Index