]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
target: share WinUAE build date with Unix
authorStefan Reinauer <stefan.reinauer@coreboot.org>
Fri, 5 Jun 2026 04:41:16 +0000 (21:41 -0700)
committerStefan <stefan.reinauer@coreboot.org>
Sun, 14 Jun 2026 04:50:59 +0000 (21:50 -0700)
The Unix target date was copied as a separate literal and had already
drifted from the date used by the Windows version macros. Move the
date macros to a small shared header and have both targets read the
same value.

include/winuae_builddate.h [new file with mode: 0644]
od-unix/config.cpp
od-win32/win32.h

diff --git a/include/winuae_builddate.h b/include/winuae_builddate.h
new file mode 100644 (file)
index 0000000..cc3c5f4
--- /dev/null
@@ -0,0 +1,11 @@
+#ifndef UAE_WINUAE_BUILDDATE_H
+#define UAE_WINUAE_BUILDDATE_H
+
+#define MAKEBD(x,y,z) ((((x) - 2000) * 10000 + (y)) * 100 + (z))
+#define GETBDY(x) ((x) / 1000000 + 2000)
+#define GETBDM(x) (((x) - ((x / 10000) * 10000)) / 100)
+#define GETBDD(x) ((x) % 100)
+
+#define WINUAEDATE MAKEBD(2026, 6, 11)
+
+#endif
index 9248147db2eea5b1e452b9ce977a47d63462ef13..40d51ca835b81094df37a828111026d118d3c250 100644 (file)
@@ -17,6 +17,7 @@ static int unix_avi_audio_codec = AVIAUDIO_AVI;
 #include "savestate.h"
 #include "sound_unix.h"
 #include "uaeserial_unix.h"
+#include "winuae_builddate.h"
 #ifdef WITH_MIDI
 #include "midi.h"
 #endif
@@ -793,7 +794,7 @@ void fetch_videopath(TCHAR *out, int size) { fetch_user_data_path_override(out,
 
 void target_getdate(int *y, int *m, int *d)
 {
-    *y = 2026;
-    *m = 5;
-    *d = 10;
+    *y = GETBDY(WINUAEDATE);
+    *m = GETBDM(WINUAEDATE);
+    *d = GETBDD(WINUAEDATE);
 }
index a8c886a112a4bc008499dd818c6cecd5981490e1..c1b00659ec53ee53b859a9555044d7ff407fd29e 100644 (file)
 #ifndef __WIN32_H__
 #define __WIN32_H__
 
-#define MAKEBD(x,y,z) ((((x) - 2000) * 10000 + (y)) * 100 + (z))
-#define GETBDY(x) ((x) / 1000000 + 2000)
-#define GETBDM(x) (((x) - ((x / 10000) * 10000)) / 100)
-#define GETBDD(x) ((x) % 100)
+#include "winuae_builddate.h"
 
 #define WINUAEPUBLICBETA 1
 #define LANG_DLL 1
@@ -25,8 +22,6 @@
 #define WINUAEBETA _T("")
 #endif
 
-#define WINUAEDATE MAKEBD(2026, 6, 11)
-
 //#define WINUAEEXTRA _T("AmiKit Preview")
 //#define WINUAEEXTRA _T("Amiga Forever Edition")