diff --git a/src/interfaces/ecpg/ecpglib/misc.c b/src/interfaces/ecpg/ecpglib/misc.c
index c884fa3969d9184a4dc1ddee4e668c2bb995b9a2..a9ac84b149d8222a384b643c343a5776aa8f2920 100644
--- a/src/interfaces/ecpg/ecpglib/misc.c
+++ b/src/interfaces/ecpg/ecpglib/misc.c
@@ -1,4 +1,4 @@
-/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.6 2003/06/25 11:51:18 meskes Exp $ */
+/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.7 2003/06/26 01:33:23 momjian Exp $ */
 
 #define POSTGRES_ECPG_INTERNAL
 #include "postgres_fe.h"
@@ -18,6 +18,11 @@
 #include "pgtypes_timestamp.h"
 #include "pgtypes_interval.h"
 
+#ifndef LONG_LONG_MIN
+#define LONG_LONG_MIN LLONG_MIN
+#endif
+
+                                                 
 static struct sqlca_t sqlca_init =
 {
 	{