[tpop3d-discuss][PATCH]: fix build when both - mysql and postgresql are enabled

Arkadiusz Miskiewicz arekm at pld-linux.org
Fri, 20 Aug 2004 00:02:09 +0200


Some variables internally used by auth_mysql.c and auth_pgsql.c
were non static and because there are the same names in both
modules there were overlaping also. Fix attached.

diff -urN tpop3d-1.5.3.org/auth_mysql.c tpop3d-1.5.3/auth_mysql.c
=2D-- tpop3d-1.5.3.org/auth_mysql.c	2004-08-19 23:51:19.751469352 +0200
+++ tpop3d-1.5.3/auth_mysql.c	2004-08-19 23:54:16.564589672 +0200
@@ -44,7 +44,7 @@
  *  [2] unix user
  *  [3] mailbox type
  */
=2Dchar *user_pass_query_template =3D
+static char *user_pass_query_template =3D
     "SELECT concat(domain.path, '/', popbox.mbox_name), popbox.password_ha=
sh, "
             "domain.unix_user, 'bsd' "
       "FROM popbox, domain "
@@ -52,7 +52,7 @@
        "AND popbox.domain_name =3D '$(domain)' "
        "AND popbox.domain_name =3D domain.domain_name";
       =20
=2Dchar *apop_query_template =3D
+static char *apop_query_template =3D
     "SELECT concat(domain.path, '/', popbox.mbox_name), popbox.password_ha=
sh, "
             "domain.unix_user, 'bsd' "
       "FROM popbox, domain "
@@ -60,7 +60,7 @@
        "AND popbox.domain_name =3D '$(domain)' "
        "AND popbox.domain_name =3D domain.domain_name";
=20
=2Dchar *onlogin_query_template =3D NULL;
+static char *onlogin_query_template =3D NULL;
=20
 /* GID used to access mail spool (if any). */
 int use_gid;
diff -urN tpop3d-1.5.3.org/auth_pgsql.c tpop3d-1.5.3/auth_pgsql.c
=2D-- tpop3d-1.5.3.org/auth_pgsql.c	2004-08-19 23:51:18.772618160 +0200
+++ tpop3d-1.5.3/auth_pgsql.c	2004-08-19 23:54:37.936340672 +0200
@@ -105,7 +105,7 @@
  *  [2] unix user
  *  [3] mailbox type
  */
=2Dchar *user_pass_query_template =3D
+static char *user_pass_query_template =3D
     "SELECT domain.path || '/'  || popbox.mbox_name, popbox.password_hash,=
 "
             "domain.unix_user, 'bsd' "
       "FROM popbox, domain "
@@ -113,7 +113,7 @@
        "AND popbox.domain_name =3D '$(domain)' "
        "AND popbox.domain_name =3D domain.domain_name";
       =20
=2Dchar *apop_query_template =3D
+static char *apop_query_template =3D
     "SELECT domain.path || '/' || popbox.mbox_name, popbox.password_hash, "
             "domain.unix_user, 'bsd' "
       "FROM popbox, domain "
@@ -121,7 +121,7 @@
        "AND popbox.domain_name =3D '$(domain)' "
        "AND popbox.domain_name =3D domain.domain_name";
=20
=2Dchar *onlogin_query_template =3D NULL;
+static char *onlogin_query_template =3D NULL;
=20
 /* GID used to access mail spool (if any). */
 int use_gid;


=2D-=20
Arkadiusz Mi=B6kiewicz     CS at FoE, Wroclaw University of Technology
arekm.pld-linux.org, 1024/3DB19BBD, JID: arekm.jabber.org, PLD/Linux