summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandreas_kupries <akupries@shaw.ca>2009-11-17 17:27:40 (GMT)
committerandreas_kupries <akupries@shaw.ca>2009-11-17 17:27:40 (GMT)
commit4f06c71212edaa364a17afb82ec352a1c960a498 (patch)
tree14133111c4f67978d4631e2cd62268dc6fb1138e
parentdce1b940f545bb8797289e11aed2715451c71396 (diff)
downloadtcl-4f06c71212edaa364a17afb82ec352a1c960a498.zip
tcl-4f06c71212edaa364a17afb82ec352a1c960a498.tar.gz
tcl-4f06c71212edaa364a17afb82ec352a1c960a498.tar.bz2
* unix/tclUnixChan.c (TtyParseMode): Partial undo of Donal's tidy-
up from a few days ago (2009-11-9, not in ChangeLog). strchr is apparently a macro on AIX and reacts badly to pre-processor directives in its arguments.
-rw-r--r--ChangeLog7
-rw-r--r--unix/tclUnixChan.c14
2 files changed, 16 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 0dcbf3f..c3fe2f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-11-17 Andreas Kupries <andreask@activestate.com>
+
+ * unix/tclUnixChan.c (TtyParseMode): Partial undo of Donal's tidy-
+ up from a few days ago (2009-11-9, not in ChangeLog). strchr is
+ apparently a macro on AIX and reacts badly to pre-processor
+ directives in its arguments.
+
2009-11-16 Alexandre Ferrieux <ferrieux@users.sourceforge.net>
* generic/tclEncoding.c: (forward port) Fix [Bug 2891556] and improve
diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c
index 323d9e2..aaca9f4 100644
--- a/unix/tclUnixChan.c
+++ b/unix/tclUnixChan.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixChan.c,v 1.102 2009/11/09 13:47:23 dkf Exp $
+ * RCS: @(#) $Id: tclUnixChan.c,v 1.103 2009/11/17 17:27:40 andreas_kupries Exp $
*/
#include "tclInt.h" /* Internal definitions for Tcl. */
@@ -1390,15 +1390,19 @@ TtyParseMode(
/*
* Only allow setting mark/space parity on platforms that support it Make
* sure to allow for the case where strchr is a macro. [Bug: 5089]
+ *
+ * We cannot if/else/endif the strchr arguments, it has to be the whole
+ * function. On AIX this function is apparently a macro, and macros do
+ * not allow pre-processor directives in their arguments.
*/
- if (strchr(
+ if (
#if defined(PAREXT) || defined(USE_TERMIO)
- "noems",
+ strchr("noems", parity)
#else
- "noe",
+ strchr("noe", parity)
#endif /* PAREXT|USE_TERMIO */
- parity) == NULL) {
+ == NULL) {
if (interp != NULL) {
Tcl_AppendResult(interp, bad, " parity: should be ",
#if defined(PAREXT) || defined(USE_TERMIO)