]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
prowizard: use C linkage for ripper hooks
authorStefan Reinauer <stefan.reinauer@coreboot.org>
Sun, 31 May 2026 02:57:32 +0000 (19:57 -0700)
committerStefan Reinauer <stefan.reinauer@coreboot.org>
Mon, 1 Jun 2026 04:12:31 +0000 (21:12 -0700)
The ripper entry points are consumed from C++ code. Wrap the public
declarations and the compiled search entry point in C linkage so names
match across C and C++ builds.

prowizard/include/extern.h
prowizard/prowiz.c

index 5c78ae2b65de683118a02755b6d33c25d46b13c4..5f424f6321b35344ce8520cbc4d1665c8e196cdc 100644 (file)
@@ -354,7 +354,12 @@ extern char Extensions[_KNOWN_FORMATS+1][33];
 extern Uchar CONVERT;
 extern Uchar Amiga_EXE_Header;
 
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern void pw_write_log (const char *, ...);
 extern FILE *moduleripper2_fopen (const char *name, const char *mode, const char *aid, int addr, int size);
 extern FILE *moduleripper_fopen (const char *aname, const char *amode);
-
+#ifdef __cplusplus
+}
+#endif
index e889b7c56f483023f00ee1cdb0d12ce6e99d9532..f2dddcc1a9ef49d319bf0b928f13c8d3a7b0fd5b 100644 (file)
@@ -13,6 +13,9 @@
 #if 0
 int main ( int ac , char **av )
 #else
+#ifdef __cplusplus
+extern "C"
+#endif
 int prowizard_search (Uchar *in_data_p, int PW_in_size_p)
 #endif
 {