Re: [AD] dll binary compatibility maintenance.

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


just committed the following patch.

please remember to add functions and variables you remove from allegro to 
include/allegro/compat.h and src/win/compat.c. (but only symbols that are 
exported)

ps! i'm going to commit the dll version resource script soon along with the 
needed makefile updates. it's kinda cool to view additional info on the 
allegro DLL when you right-click on the dll and select 'properties' ;o)

-henrik
diff -urN ../allegro/include/allegro/compat.h allegro/include/allegro/compat.h
--- ../allegro/include/allegro/compat.h	Thu Jan  1 01:00:00 1970
+++ allegro/include/allegro/compat.h	Fri Jul 13 15:58:30 2001
@@ -0,0 +1,21 @@
+/*         ______   ___    ___
+ *        /\  _  \ /\_ \  /\_ \
+ *        \ \ \L\ \\//\ \ \//\ \      __     __   _ __   ___
+ *         \ \  __ \ \ \ \  \ \ \   /'__`\ /'_ `\/\`'__\/ __`\
+ *          \ \ \/\ \ \_\ \_ \_\ \_/\  __//\ \L\ \ \ \//\ \L\ \
+ *           \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
+ *            \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
+ *                                           /\____/
+ *                                           \_/__/
+ *
+ *      Contains definitions for dummy symbols for maintaining DLL
+ *      compatibility.
+ *
+ *      By Henrik Stokseth.
+ */
+
+#ifndef ALLEGRO_WINDOWS
+   #error Something is wrong with the makefiles.
+#endif
+
+AL_FUNC(void, _load_config_text, (void));
diff -urN ../allegro/include/winalleg.h allegro/include/winalleg.h
--- ../allegro/include/winalleg.h	Fri Jul 13 15:20:36 2001
+++ allegro/include/winalleg.h	Fri Jul 13 15:58:11 2001
@@ -41,6 +41,7 @@
 #undef BITMAP
 #undef RGB
 
+#include "allegro/compat.h"
 
 typedef struct WIN_GFX_DRIVER {
    int has_backing_store;
diff -urN ../allegro/makefile.lst allegro/makefile.lst
--- ../allegro/makefile.lst	Fri Jul 13 15:20:36 2001
+++ allegro/makefile.lst	Fri Jul 13 15:58:11 2001
@@ -163,6 +163,7 @@
 
 ALLEGRO_SRC_WIN_FILES = \
 	src/win/asmlock.s \
+	src/win/compat.c \
 	src/win/gdi.c \
 	src/win/wddaccel.c \
 	src/win/wddbmp.c \
diff -urN ../allegro/src/win/compat.c allegro/src/win/compat.c
--- ../allegro/src/win/compat.c	Thu Jan  1 01:00:00 1970
+++ allegro/src/win/compat.c	Fri Jul 13 15:58:11 2001
@@ -0,0 +1,32 @@
+/*         ______   ___    ___
+ *        /\  _  \ /\_ \  /\_ \
+ *        \ \ \L\ \\//\ \ \//\ \      __     __   _ __   ___
+ *         \ \  __ \ \ \ \  \ \ \   /'__`\ /'_ `\/\`'__\/ __`\
+ *          \ \ \/\ \ \_\ \_ \_\ \_/\  __//\ \L\ \ \ \//\ \L\ \
+ *           \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
+ *            \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
+ *                                           /\____/
+ *                                           \_/__/
+ *
+ *      Contains dummy symbols for maintaining DLL compatibility.
+ *      Definitions go into include/allegro/compat.h
+ *
+ *      By Henrik Stokseth.
+ */
+
+#include "allegro.h"
+#include "allegro/aintern.h"
+
+static void dll_error();
+
+static void dll_error()
+{
+   allegro_message("FATAL ERROR: You tried to use a function that has been removed from Allegro!\n");
+   allegro_exit();
+   exit(-666);
+}
+
+/* dummy functions */
+
+void _load_config_text()
+{ dll_error(); }


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/