--- freem/src/global_bltin.c 2025/03/09 19:14:25 1.4
+++ freem/src/global_bltin.c 2025/05/02 16:30:16 1.25
@@ -1,5 +1,5 @@
/*
- * $Id: global_bltin.c,v 1.4 2025/03/09 19:14:25 snw Exp $
+ * $Id: global_bltin.c,v 1.25 2025/05/02 16:30:16 snw Exp $
* freem database engine
*
*
@@ -24,6 +24,21 @@
* along with FreeM. If not, see .
*
* $Log: global_bltin.c,v $
+ * Revision 1.25 2025/05/02 16:30:16 snw
+ * Fix broken build due to time issues
+ *
+ * Revision 1.24 2025/04/28 14:52:54 snw
+ * Temporarily revert global handler refactor and fix reference regression in xecline
+ *
+ * Revision 1.7 2025/03/24 04:13:11 snw
+ * Replace action macro dat with fra_dat to avoid symbol conflict on OS/2
+ *
+ * Revision 1.6 2025/03/24 01:33:30 snw
+ * Guard declaration of time function in global_bltin.c for portability
+ *
+ * Revision 1.5 2025/03/22 22:52:24 snw
+ * Add STRLEN_GBL macro to manage global string length
+ *
* Revision 1.4 2025/03/09 19:14:25 snw
* First phase of REUSE compliance and header reformat
*
@@ -37,6 +52,11 @@
#include
#include
#include
+#if defined(USE_SYS_TIME_H) && !defined(MSDOS) && !defined(__osf__)
+# include
+#else
+# include
+#endif
#include
@@ -95,7 +115,7 @@ static void panic (void);
#define BOTTOM 6
#define DATA 8
-#if !defined(__OpenBSD__) && !defined(_AIX) && !defined(__osf__) && !defined(MSDOS) && !defined(__vax__)
+#if !defined(__OpenBSD__) && !defined(_AIX) && !defined(__osf__) && !defined(MSDOS) && !defined(__vax__) && !defined(__OS2__) && !defined(__linux__)
long time ();
#endif
@@ -684,7 +704,7 @@ reopen:
return;
}
- if (action == dat || action == zdata) {
+ if (action == fra_dat || action == zdata) {
data[0] = '0';
data[1] = EOL1;
@@ -1250,7 +1270,7 @@ s20:
break;
- case dat:
+ case fra_dat:
data[0] = '0';
data[1] = EOL1;
@@ -1606,6 +1626,7 @@ s20:
}
zref[j++] = ch0;
+
if (j >= 252) {
zref[j] = EOL;