Skip to content

Commit 9d4a45e

Browse files
committed
Avoid #ifdef inside printf() ... that loses on platforms where printf()
is a macro.
1 parent a1e28d3 commit 9d4a45e

File tree

1 file changed

+8
-7
lines changed
  • src/interfaces/ecpg/preproc

1 file changed

+8
-7
lines changed

src/interfaces/ecpg/preproc/ecpg.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.47 2001/08/24 22:37:36 petere Exp $ */
1+
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.48 2001/08/28 02:47:18 tgl Exp $ */
22

33
/* New main for ecpg, the PostgreSQL embedded SQL precompiler. */
44
/* (C) Michael Meskes <meskes@postgresql.org> Feb 5th, 1998 */
@@ -29,15 +29,16 @@ help(const char *progname)
2929
{
3030
printf("%s is the PostgreSQL embedded SQL preprocessor for C programs.\n\n",
3131
progname);
32-
printf("Usage:\n"
33-
" %s %s[-I DIRECTORY] [-o OUTFILE] [-t] file1 [file2...]\n\n",
34-
progname,
32+
/* printf is a macro some places; don't #ifdef inside its arguments */
3533
#ifdef YYDEBUG
36-
"[-d] "
34+
printf("Usage:\n"
35+
" %s [-d] [-I DIRECTORY] [-o OUTFILE] [-t] file1 [file2...]\n\n",
36+
progname);
3737
#else
38-
""
38+
printf("Usage:\n"
39+
" %s [-I DIRECTORY] [-o OUTFILE] [-t] file1 [file2...]\n\n",
40+
progname);
3941
#endif
40-
);
4142
printf("Options:\n");
4243
#ifdef YYDEBUG
4344
printf(" -d generate parser debug output\n");

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy