> Is this bad coding etiquette ?
>
> [u]dbdimp.c[/u]
>
> 4459 if (!my_login(h, imp_dbh))
> 4460 {
> 4461 [b]do_error(h,
> mysql_errno(&imp_dbh->mysql),
> mysql_error(&imp_dbh->mysql)[/b]
> 4462 #if MYSQL_VERSION_ID >= SQL_STATE_VERSION
> 4463 [b],
> mysql_sqlstate(&imp_dbh->mysql));[/b]
> 4464 #else
> 4465 [b] );[/b]
> 4466 #endif
I wouldn't say so. He's actually trying to be smart, but he must have made an
assumption because obviously the #if MYSQL_VERSION_ID >= SQL_STATE_VERSION
doesn't hold true, and the preprocessor doesn't doesn't insert it in before
passing the code off to the compiler.
So:
the dirty way is, remove #if ... #endif and at least that part should pass
through the compiler.
The clean way is, find out why MYSQL_VERSION_ID isn't greater or at least equal
to SQL_STATE_VERSION.
This message posted from opensolaris.org
_______________________________________________
opensolaris-discuss mailing list
[email protected]