esql on Windows: -ed or -ED?
Posted in 2006
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Hi list, I discovered what looks like a little documentation bug in esql on Windows (CSDK 2.90TC5). The primary development platform for my InformixDB Python module is Linux, but once in a while I dust off my Windows box to build a Windows binary. Part of the build script checks the version of esql and turns on a $define (via an -ED switch) to include certain features only if esql 9 or better is present. On Windows, esql's usage info told me that the flag for defining a preprocessor name is -ed instead of -ED. I had no reason to doubt that, so I put in a branch into my build script to signal the presence of esql 9 with -ed on Windows and -ED on everything else. Recently I discovered by coincidence that esql silently ignored my -ed switch and left out all code paths that require esql 9. On a whim, I changed my build script to use -ED instead, and that worked. The fix is obvious, my build script should always use -ED instead of making an exception for Windows. However, I am wondering if there are older versions of esql on Windows that do honor -ed instead of -ED, and if any of them are recent enough that I'd have to worry about my fix breaking compatibility with them. I'd appreciate it if somebody with sufficient knowledge of Informix history could shed some light on this. Thanks, Carsten Haese.
Carsten Haese wrote: > I discovered what looks like a little documentation bug in esql on Windows > (CSDK 2.90TC5). The primary development platform for my InformixDB Python > module is Linux, but once in a while I dust off my Windows box to build a > Windows binary. > > Part of the build script checks the version of esql and turns on a $define > (via an -ED switch) to include certain features only if esql 9 or better is > present. On Windows, esql's usage info told me that the flag for defining a > preprocessor name is -ed instead of -ED. I had no reason to doubt that, so I > put in a branch into my build script to signal the presence of esql 9 with -ed > on Windows and -ED on everything else. > > Recently I discovered by coincidence that esql silently ignored my -ed switch > and left out all code paths that require esql 9. On a whim, I changed my build > script to use -ED instead, and that worked. I'm puzzled - AFAIK, the documentation has always used -ED rather than -ed, but you say you found some contrarian documentation. Please report that to "docinf at us.ibm.com" - the (anti-spammed) Informix Tech Pubs email for errata. > The fix is obvious, my build script should always use -ED instead of making an > exception for Windows. However, I am wondering if there are older versions of > esql on Windows that do honor -ed instead of -ED, and if any of them are > recent enough that I'd have to worry about my fix breaking compatibility with > them. I'd appreciate it if somebody with sufficient knowledge of Informix > history could shed some light on this. If there are any such versions (on which I have my doubts), you could simply decide not to support them. Or, work out the ESQL/C version and configure accordingly.