]> SAFE projects GIT repository - jmp/mailleur/commitdiff
Improving SQL libray usage
authorJean-Marc Pigeon (Delson) <jmp@safe.ca>
Wed, 18 Jun 2025 00:09:45 +0000 (20:09 -0400)
committerJean-Marc Pigeon (Delson) <jmp@safe.ca>
Wed, 18 Jun 2025 00:09:45 +0000 (20:09 -0400)
lib/Makefile
lib/unimar.c

index d2638495ca283351c10bc06d23cd74d8d0c37811..e974170037273b8ed5b78b39c49bd59f745b708e 100644 (file)
@@ -146,7 +146,11 @@ toremake:  Makefile
 #--------------------------------------------------------------------
 CC     = gcc
 LD     = gcc
-CFLAGS = -Wall -D_GNU_SOURCE $(OPTIME) -DDATABASE=$(DB)
+CFLAGS = -Wall -D_GNU_SOURCE                                   \
+         -DDATABASE=$(DB)                                      \
+         -Dwith_postgres                                       \
+         -Dwith_mysql                                          \
+         $(OPTIME)
 LIBMAIL        = libmail.a
 PAR    = -j`/usr/bin/getconf _NPROCESSORS_ONLN`
 #--------------------------------------------------------------------
index 897a2130483352659bead6a42f4b249341437045..a3013c1ec0de3b3efc5f9e6a218a8136822ef87a 100644 (file)
@@ -82,7 +82,7 @@ MARPTR *mar_closesql(MARPTR *marptr)
 #define OPEP    "sqlmar.c:mar_closesql,"
 
 #ifdef  DB_MYSQL
-  (void) mysql_close(MYSQL *marptr);
+  (void) mysql_close((MYSQL *)marptr);
 #else
   (void) fprintf(stderr,"%s not compiled to be used with mysql\n",OPEP);
 #endif