Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 3faa9ba

Browse files
committed
Patch possible portability problem: a few places had // style comments,
which is not ANSI C, even though some compilers will take it...
1 parent 64ef5c8 commit 3faa9ba

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

src/interfaces/ecpg/include/sql3types.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
*
33
* Copyright (c) 2000, Christof Petig <christof.petig@wtal.de>
44
*
5-
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/include/sql3types.h,v 1.2 2000/03/01 12:49:41 meskes Exp $
5+
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/include/sql3types.h,v 1.3 2000/03/17 23:26:30 tgl Exp $
66
*/
77

88
/* chapter 13.1 table 2: Codes used for SQL data types in Dynamic SQL */
@@ -16,14 +16,14 @@ enum { SQL3_CHARACTER=1,
1616
SQL3_REAL,
1717
SQL3_DOUBLE_PRECISION,
1818
SQL3_DATE_TIME_TIMESTAMP,
19-
SQL3_INTERVAL, //10
19+
SQL3_INTERVAL, /* 10 */
2020
SQL3_CHARACTER_VARYING=12,
2121
SQL3_ENUMERATED,
2222
SQL3_BIT,
2323
SQL3_BIT_VARYING,
2424
SQL3_BOOLEAN,
2525
SQL3_abstract
26-
// the rest is xLOB stuff
26+
/* the rest is xLOB stuff */
2727
};
2828

2929
/* chapter 13.1 table 3: Codes associated with datetime data types in Dynamic SQL */

src/interfaces/ecpg/lib/data.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ get_data(PGresult *results, int act_tuple, int act_field, int lineno,
185185
}
186186
else if (pval[0] == '\0' && PQgetisnull(results, act_tuple, act_field))
187187
{
188-
// NULL is valid
188+
/* NULL is valid */
189189
break;
190190
}
191191
}

src/interfaces/ecpg/lib/execute.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@ ECPGdo(int lineno, const char *connection_name, char *query, ...)
814814
*
815815
* Copyright (c) 2000, Christof Petig <christof.petig@wtal.de>
816816
*
817-
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/execute.c,v 1.1 2000/03/07 15:10:56 meskes Exp $
817+
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/execute.c,v 1.2 2000/03/17 23:26:31 tgl Exp $
818818
*/
819819

820820
PGconn *ECPG_internal_get_connection(char *name);
@@ -826,7 +826,7 @@ extern struct descriptor
826826
struct descriptor *next;
827827
} *all_descriptors;
828828

829-
// like ECPGexecute
829+
/* like ECPGexecute */
830830
static bool execute_descriptor(int lineno,const char *query
831831
,struct connection *con,PGresult **resultptr)
832832
{

src/interfaces/ecpg/preproc/ecpg_keywords.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ static ScanKeyword ScanKeywords[] = {
6161
{"section", SQL_SECTION},
6262
{"short", SQL_SHORT},
6363
{"signed", SQL_SIGNED},
64-
{"sql",SQL_SQL}, // strange thing, used for into sql descriptor MYDESC;
64+
{"sql",SQL_SQL}, /* strange thing, used for into sql descriptor MYDESC; */
6565
{"sqlerror", SQL_SQLERROR},
6666
{"sqlprint", SQL_SQLPRINT},
6767
{"sqlwarning", SQL_SQLWARNING},

src/interfaces/ecpg/test/dyntest.pgc

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
*
33
* Copyright (c) 2000, Christof Petig <christof.petig@wtal.de>
44
*
5-
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/test/Attic/dyntest.pgc,v 1.5 2000/03/03 13:24:06 meskes Exp $
5+
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/test/Attic/dyntest.pgc,v 1.6 2000/03/17 23:26:36 tgl Exp $
66
*/
77

88
#include <stdio.h>
@@ -139,7 +139,7 @@ int main(int argc,char **argv)
139139
break;
140140
case SQL3_NUMERIC:
141141
case SQL3_DECIMAL:
142-
if (SCALE==0) // we might even print leading zeros "%0*d"
142+
if (SCALE==0) /* we might even print leading zeros "%0*d" */
143143
{ exec sql get descriptor MYDESC value :INDEX :INTVAR=data;
144144
printf("%*d",PRECISION,INTVAR);
145145
}

0 commit comments

Comments
 (0)