changeset 152:d48a8b8d2ef9

- integrated all headers containing DCCallback definition into the translation units used (arm64 already avoided this pointless header, so following that style) - some cleanups, removal of unnecessary includes, etc.
author cslag
date Sat, 22 Oct 2016 15:55:54 +0200
parents dac66f0107ea
children 3e67a1212cb0
files dyncallback/dyncall_callback_arm32.c dyncallback/dyncall_callback_arm32.h dyncallback/dyncall_callback_arm64.c dyncallback/dyncall_callback_mips.c dyncallback/dyncall_callback_mips.h dyncallback/dyncall_callback_ppc32.c dyncallback/dyncall_callback_ppc32.h dyncallback/dyncall_callback_ppc64.c dyncallback/dyncall_callback_ppc64.h dyncallback/dyncall_callback_sparc32.c dyncallback/dyncall_callback_sparc32.h dyncallback/dyncall_callback_sparc64.c dyncallback/dyncall_callback_x64.c dyncallback/dyncall_callback_x64.h dyncallback/dyncall_callback_x86.c dyncallback/dyncall_callback_x86.h
diffstat 16 files changed, 119 insertions(+), 378 deletions(-) [+]
line wrap: on
line diff
--- a/dyncallback/dyncall_callback_arm32.c	Sat Sep 17 14:31:54 2016 +0200
+++ b/dyncallback/dyncall_callback_arm32.c	Sat Oct 22 15:55:54 2016 +0200
@@ -24,12 +24,21 @@
 */
 
 
-#include "dyncall_callback_arm32.h"
-
+#include "dyncall_callback.h"
 #include "dyncall_alloc_wx.h"
+#include "dyncall_thunk.h"
 
+/* Callback symbol. */
 extern void dcCallbackThunkEntry();
 
+struct DCCallback
+{
+  DCThunk  	         thunk;    // offset 0
+  DCCallbackHandler* handler;  // offset 12
+  void*              userdata; // offset 16
+};
+
+
 void dcbInitCallback(DCCallback* pcb, const char* signature, DCCallbackHandler* handler, void* userdata)
 {
   pcb->handler  = handler;
--- a/dyncallback/dyncall_callback_arm32.h	Sat Sep 17 14:31:54 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
-
- Package: dyncall
- Library: dyncallback
- File: dyncallback/dyncall_callback_arm32.h
- Description: Callback - Header for ARM32 (ARM and THUMB mode)
- License:
-
-   Copyright (c) 2007-2015 Daniel Adler <dadler@uni-goettingen.de>,
-                           Tassilo Philipp <tphilipp@potion-studios.com>
-
-   Permission to use, copy, modify, and distribute this software for any
-   purpose with or without fee is hereby granted, provided that the above
-   copyright notice and this permission notice appear in all copies.
-
-   THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-   WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-   MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-   ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-   WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-   ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-   OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-*/
-
-
-
-#ifndef DYNCALL_CALLBACK_ARM32_H_
-#define DYNCALL_CALLBACK_ARM32_H_
-
-#include "dyncall_callback.h"
-
-#include "dyncall_thunk.h"
-#include "dyncall_args_arm32.h"
-
-
-struct DCCallback
-{
-  DCThunk  	         thunk;    // offset 0
-  DCCallbackHandler* handler;  // offset 12
-  void*              userdata; // offset 16
-};
-
-
-#endif /* DYNCALL_CALLBACK_ARM32_H_ */
-
--- a/dyncallback/dyncall_callback_arm64.c	Sat Sep 17 14:31:54 2016 +0200
+++ b/dyncallback/dyncall_callback_arm64.c	Sat Oct 22 15:55:54 2016 +0200
@@ -6,8 +6,8 @@
  Description: Callback - Implementation for ARM64 / ARMv8 / AAPCS64
  License:
 
-   Copyright (c) 2015 Daniel Adler <dadler@uni-goettingen.de>,
-                      Tassilo Philipp <tphilipp@potion-studios.com>
+   Copyright (c) 2015-2016 Daniel Adler <dadler@uni-goettingen.de>,
+                           Tassilo Philipp <tphilipp@potion-studios.com>
 
    Permission to use, copy, modify, and distribute this software for any
    purpose with or without fee is hereby granted, provided that the above
@@ -23,23 +23,21 @@
 
 */
 
+
 #include "dyncall_callback.h"
 #include "dyncall_alloc_wx.h"
 #include "dyncall_thunk.h"
 
+/* Callback symbol. */
 extern void dcCallbackThunkEntry();
 
-struct DCCallback
-{
-                                //  off  size
-                                // ----|-----
-  DCThunk            thunk;	//   0     32
-  DCCallbackHandler* handler; 	//  32      8
-  void*              userdata;	//  40      8
-                                //
-                                //  size   48 
-                                // aligned 48 
-};
+struct DCCallback               /*  off  size */
+{                               /* ----|----- */
+  DCThunk            thunk;     /*   0     32 */
+  DCCallbackHandler* handler;   /*  32      8 */
+  void*              userdata;  /*  40      8 */
+};                              /* total   48 */ 
+                                /* aligned 48 */ 
 
 void dcbInitCallback(DCCallback* pcb, const char* signature, DCCallbackHandler* handler, void* userdata)
 {
--- a/dyncallback/dyncall_callback_mips.c	Sat Sep 17 14:31:54 2016 +0200
+++ b/dyncallback/dyncall_callback_mips.c	Sat Oct 22 15:55:54 2016 +0200
@@ -6,7 +6,7 @@
  Description: Callback - Implementation Header for MIPS
  License:
 
-   Copyright (c) 2013-2015 Daniel Adler <dadler@uni-goettingen.de>,
+   Copyright (c) 2013-2016 Daniel Adler <dadler@uni-goettingen.de>,
                            Tassilo Philipp <tphilipp@potion-studios.com>
 
    Permission to use, copy, modify, and distribute this software for any
@@ -25,9 +25,20 @@
 
 
 #include "dyncall_callback.h"
-#include "dyncall_callback_mips.h"
+#include "dyncall_alloc_wx.h"
+#include "dyncall_thunk.h"
+
+/* Callback symbol. */
+extern void dcCallbackThunkEntry();
 
-extern void dcCallbackThunkEntry();
+/* might want to make use of __packed__ or so @@@ */
+struct DCCallback              /*       mips32      |       mips64      */
+{                              /* ------------------+------------------ */
+  DCThunk            thunk;    /* offset  0 size 20 | offset  0 size 56 */
+  DCCallbackHandler* handler;  /* offset 20 size  4 | offset 56 size  8 */
+  void*              userdata; /* offset 24 size  4 | offset 64 size  8 */
+};
+
 
 void dcbInitCallback(DCCallback* pcb, const char* signature, DCCallbackHandler* handler, void* userdata)
 {
--- a/dyncallback/dyncall_callback_mips.h	Sat Sep 17 14:31:54 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-
- Package: dyncall
- Library: dyncallback
- File: dyncallback/dyncall_callback_mips.h
- Description: Callback - Header for MIPS
- License:
-
-   Copyright (c) 2013-2015 Daniel Adler <dadler@uni-goettingen.de>,
-                           Tassilo Philipp <tphilipp@potion-studios.com>
-
-   Permission to use, copy, modify, and distribute this software for any
-   purpose with or without fee is hereby granted, provided that the above
-   copyright notice and this permission notice appear in all copies.
-
-   THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-   WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-   MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-   ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-   WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-   ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-   OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-*/
-
-
-#ifndef DYNCALL_CALLBACK_MIPS_H
-#define DYNCALL_CALLBACK_MIPS_H
-
-#include "dyncall_callback.h"
-
-#include "dyncall_thunk.h"
-#include "dyncall_args_mips.h"
-
-struct DCCallback /* might want to make use of __packed__ or so @@@ */
-{
-  DCThunk            thunk;    /* offset/size: mips32(0/20), mips64(0/56) */
-  DCCallbackHandler* handler;  /* offset/size: mips32(20/4), mips64(56/8) */
-  void*              userdata; /* offset/size: mips32(24/4), mips64(64/8) */
-};
-
-#endif /* DYNCALL_CALLBACK_MIPS_H */
-
--- a/dyncallback/dyncall_callback_ppc32.c	Sat Sep 17 14:31:54 2016 +0200
+++ b/dyncallback/dyncall_callback_ppc32.c	Sat Oct 22 15:55:54 2016 +0200
@@ -6,7 +6,7 @@
  Description: Callback - Implementation Header for ppc32
  License:
 
-   Copyright (c) 2007-2015 Daniel Adler <dadler@uni-goettingen.de>,
+   Copyright (c) 2007-2016 Daniel Adler <dadler@uni-goettingen.de>,
                            Tassilo Philipp <tphilipp@potion-studios.com>
 
    Permission to use, copy, modify, and distribute this software for any
@@ -25,7 +25,20 @@
 
 
 #include "dyncall_callback.h"
-#include "dyncall_callback_ppc32.h"
+#include "dyncall_alloc_wx.h"
+#include "dyncall_thunk.h"
+
+/* Callback symbol. */
+extern void dcCallbackThunkEntry();
+
+struct DCCallback
+{
+  DCThunk            thunk;         /* offset  0 size 24 */
+  DCCallbackHandler* handler;       /* offset 24 size  4 */
+  size_t             stack_cleanup; /* offset 28 size  4 */
+  void*              userdata;      /* offset 32 size  4 */
+};                                  /*     total size 36 */                                  
+
 
 void dcbInitCallback(DCCallback* pcb, const char* signature, DCCallbackHandler* handler, void* userdata)
 {
@@ -36,8 +49,6 @@
   pcb->userdata = userdata;
 }
 
-extern void dcCallbackThunkEntry();
-
 DCCallback* dcbNewCallback(const char* signature, DCCallbackHandler* handler, void* userdata)
 {
   DCCallback* pcb;
--- a/dyncallback/dyncall_callback_ppc32.h	Sat Sep 17 14:31:54 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-
- Package: dyncall
- Library: dyncallback
- File: dyncallback/dyncall_callback_ppc32.h
- Description: Callback - Header for ppc32
- License:
-
-   Copyright (c) 2007-2015 Daniel Adler <dadler@uni-goettingen.de>,
-                           Tassilo Philipp <tphilipp@potion-studios.com>
-
-   Permission to use, copy, modify, and distribute this software for any
-   purpose with or without fee is hereby granted, provided that the above
-   copyright notice and this permission notice appear in all copies.
-
-   THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-   WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-   MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-   ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-   WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-   ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-   OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-*/
-
-#ifndef DYNCALL_CALLBACK_PPC32_H
-#define DYNCALL_CALLBACK_PPC32_H
-
-#include "dyncall_callback.h"
-
-#include "dyncall_thunk.h"
-#include "dyncall_args_ppc32.h"
-
-struct DCCallback
-{
-  DCThunk            thunk;         /* offset  0, size 24 */
-  DCCallbackHandler* handler;       /* offset 24, size  4 */
-  size_t             stack_cleanup; /* offset 28, size  4 */
-  void*              userdata;      /* offset 32, size  4 */
-};                                  /*      total size 36 */                                  
-
-#endif /* DYNCALL_CALLBACK_PPC32_H */
-
--- a/dyncallback/dyncall_callback_ppc64.c	Sat Sep 17 14:31:54 2016 +0200
+++ b/dyncallback/dyncall_callback_ppc64.c	Sat Oct 22 15:55:54 2016 +0200
@@ -6,7 +6,7 @@
  Description: Callback - Implementation Header for ppc64
  License:
 
-   Copyright (c) 2014-2015 Masanori Mitsugi <mitsugi@linux.vnet.ibm.com>
+   Copyright (c) 2014-2016 Masanori Mitsugi <mitsugi@linux.vnet.ibm.com>
 
    Permission to use, copy, modify, and distribute this software for any
    purpose with or without fee is hereby granted, provided that the above
@@ -24,7 +24,20 @@
 
 
 #include "dyncall_callback.h"
-#include "dyncall_callback_ppc64.h"
+#include "dyncall_alloc_wx.h"
+#include "dyncall_thunk.h"
+
+/* Callback symbol. */
+extern void dcCallbackThunkEntry();
+
+struct DCCallback                   /*       ELF v1      |       ELF v2      */
+{                                   /* ------------------+------------------ */
+  DCThunk            thunk;         /* offset  0 size 64 | offset  0 size 48 */
+  DCCallbackHandler* handler;       /* offset 64 size  8 | offset 48 size  8 */
+  size_t             stack_cleanup; /* offset 72 size  8 | offset 56 size  8 */
+  void*              userdata;      /* offset 80 size  8 | offset 64 size  8 */
+};
+
 
 void dcbInitCallback(DCCallback* pcb, const char* signature, DCCallbackHandler* handler, void* userdata)
 {
@@ -35,8 +48,6 @@
   pcb->userdata = userdata;
 }
 
-extern void dcCallbackThunkEntry();
-
 DCCallback* dcbNewCallback(const char* signature, DCCallbackHandler* handler, void* userdata)
 {
   DCCallback* pcb;
--- a/dyncallback/dyncall_callback_ppc64.h	Sat Sep 17 14:31:54 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-
- Package: dyncall
- Library: dyncallback
- File: dyncallback/dyncall_callback_ppc64.h
- Description: Callback - Header for ppc64
- License:
-
-   Copyright (c) 2014-2015 Masanori Mitsugi <mitsugi@linux.vnet.ibm.com>
-
-   Permission to use, copy, modify, and distribute this software for any
-   purpose with or without fee is hereby granted, provided that the above
-   copyright notice and this permission notice appear in all copies.
-
-   THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-   WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-   MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-   ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-   WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-   ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-   OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-*/
-
-#ifndef DYNCALL_CALLBACK_PPC64_H
-#define DYNCALL_CALLBACK_PPC64_H
-
-#include "dyncall_callback.h"
-
-#include "dyncall_thunk.h"
-#include "dyncall_args_ppc64.h"
-
-/*
-  ELF v2
-  thunk           : offset 0,  size 48
-  handler         : offset 48, size  8
-  stack_cleanup   : offset 56, size  8
-  userdata        : offset 64, size  8
-
-  ELF v1
-  thunk           : offset 0,  size 64
-  handler         : offset 64, size  8
-  stack_cleanup   : offset 72, size  8
-  userdata        : offset 80, size  8
-*/
-
-struct DCCallback
-{
-  DCThunk            thunk;
-  DCCallbackHandler* handler;
-  size_t             stack_cleanup;
-  void*              userdata;
-};
-
-#endif /* DYNCALL_CALLBACK_PPC64_H */
-
--- a/dyncallback/dyncall_callback_sparc32.c	Sat Sep 17 14:31:54 2016 +0200
+++ b/dyncallback/dyncall_callback_sparc32.c	Sat Oct 22 15:55:54 2016 +0200
@@ -6,7 +6,7 @@
  Description: Callback - Implementation for sparc32 (TODO: not implemented yet)
  License:
 
-   Copyright (c) 2007-2015 Daniel Adler <dadler@uni-goettingen.de>,
+   Copyright (c) 2007-2016 Daniel Adler <dadler@uni-goettingen.de>,
                            Tassilo Philipp <tphilipp@potion-studios.com>
 
    Permission to use, copy, modify, and distribute this software for any
@@ -25,16 +25,25 @@
 
 
 #include "dyncall_callback.h"
-#include "dyncall_callback_sparc32.h"
+#include "dyncall_alloc_wx.h"
+#include "dyncall_thunk.h"
+
+/* Callback symbol. */
+extern void dcCallbackThunkEntry();
 
-#include "dyncall_alloc_wx.h"
+struct DCCallback
+{
+  DCThunk            thunk;         /* offset  0, size ?? */
+  DCCallbackHandler* handler;       /* offset ??, size  4 */
+  size_t             stack_cleanup; /* offset ??, size  4 */
+  void*              userdata;      /* offset ??, size  4 */
+};
+
 
 void dcbInitCallback(DCCallback* pcb, const char* signature, DCCallbackHandler* handler, void* userdata)
 {
 }
 
-extern void dcCallbackThunkEntry();
-
 DCCallback* dcbNewCallback(const char* signature, DCCallbackHandler* handler, void* userdata)
 {
   DCCallback* pcb;
--- a/dyncallback/dyncall_callback_sparc32.h	Sat Sep 17 14:31:54 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
-
- Package: dyncall
- Library: dyncallback
- File: dyncallback/dyncall_callback_sparc32.h
- Description: Callback - Header for sparc32
- License:
-
-   Copyright (c) 2007-2015 Daniel Adler <dadler@uni-goettingen.de>,
-                           Tassilo Philipp <tphilipp@potion-studios.com>
-
-   Permission to use, copy, modify, and distribute this software for any
-   purpose with or without fee is hereby granted, provided that the above
-   copyright notice and this permission notice appear in all copies.
-
-   THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-   WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-   MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-   ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-   WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-   ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-   OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-*/
-
-
-#ifndef DYNCALL_CALLBACK_SPARC32_H
-#define DYNCALL_CALLBACK_SPARC32_H
-
-#include "dyncall_callback.h"
-
-#include "dyncall_thunk.h"
-#include "dyncall_args_sparc32.h"
-
-struct DCCallback
-{
-  DCThunk            thunk;         /* offset  0, size ?? */
-  DCCallbackHandler* handler;       /* offset ??, size  4 */
-  size_t             stack_cleanup; /* offset ??, size  4 */
-  void*              userdata;      /* offset ??, size  4 */
-};
-
-#endif /* DYNCALL_CALLBACK_SPARC32_H */
-
--- a/dyncallback/dyncall_callback_sparc64.c	Sat Sep 17 14:31:54 2016 +0200
+++ b/dyncallback/dyncall_callback_sparc64.c	Sat Oct 22 15:55:54 2016 +0200
@@ -6,7 +6,7 @@
  Description: Callback - Implementation for sparc64 (TODO: not implemented yet)
  License:
 
-   Copyright (c) 2007-2015 Daniel Adler <dadler@uni-goettingen.de>,
+   Copyright (c) 2007-2016 Daniel Adler <dadler@uni-goettingen.de>,
                            Tassilo Philipp <tphilipp@potion-studios.com>
 
    Permission to use, copy, modify, and distribute this software for any
@@ -25,16 +25,25 @@
 
 
 #include "dyncall_callback.h"
-#include "dyncall_callback_sparc32.h"
+#include "dyncall_alloc_wx.h"
+#include "dyncall_thunk.h"
+
+/* Callback symbol. */
+extern void dcCallbackThunkEntry();
 
-#include "dyncall_alloc_wx.h"
+struct DCCallback
+{
+  DCThunk            thunk;         /* offset  0, size ?? */
+  DCCallbackHandler* handler;       /* offset ??, size  4 */
+  size_t             stack_cleanup; /* offset ??, size  4 */
+  void*              userdata;      /* offset ??, size  4 */
+};
+
 
 void dcbInitCallback(DCCallback* pcb, const char* signature, DCCallbackHandler* handler, void* userdata)
 {
 }
 
-extern void dcCallbackThunkEntry();
-
 DCCallback* dcbNewCallback(const char* signature, DCCallbackHandler* handler, void* userdata)
 {
   DCCallback* pcb;
--- a/dyncallback/dyncall_callback_x64.c	Sat Sep 17 14:31:54 2016 +0200
+++ b/dyncallback/dyncall_callback_x64.c	Sat Oct 22 15:55:54 2016 +0200
@@ -6,7 +6,7 @@
  Description: Callback - Implementation for x64
  License:
 
-   Copyright (c) 2007-2015 Daniel Adler <dadler@uni-goettingen.de>,
+   Copyright (c) 2007-2016 Daniel Adler <dadler@uni-goettingen.de>,
                            Tassilo Philipp <tphilipp@potion-studios.com>
 
    Permission to use, copy, modify, and distribute this software for any
@@ -24,16 +24,21 @@
 */
 
 
-
-#include "dyncall_callback_x64.h"
-#include "dyncall_args_x64.h"
+#include "dyncall_callback.h"
 #include "dyncall_alloc_wx.h"
-
+#include "dyncall_thunk.h"
 
 /* Callback symbol. */
 extern void dcCallback_x64_sysv();
 extern void dcCallback_x64_win64();
 
+struct DCCallback
+{
+  DCThunk  	         thunk;    // offset 0,  size 24
+  DCCallbackHandler* handler;  // offset 24
+  void*              userdata; // offset 32
+};
+
 
 void dcbInitCallback(DCCallback* pcb, const char* signature, DCCallbackHandler* handler, void* userdata)
 {
--- a/dyncallback/dyncall_callback_x64.h	Sat Sep 17 14:31:54 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
-
- Package: dyncall
- Library: dyncallback
- File: dyncallback/dyncall_callback_x64.h
- Description: Callback - Header for x64
- License:
-
-   Copyright (c) 2007-2015 Daniel Adler <dadler@uni-goettingen.de>,
-                           Tassilo Philipp <tphilipp@potion-studios.com>
-
-   Permission to use, copy, modify, and distribute this software for any
-   purpose with or without fee is hereby granted, provided that the above
-   copyright notice and this permission notice appear in all copies.
-
-   THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-   WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-   MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-   ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-   WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-   ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-   OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-*/
-
-
-
-#ifndef DYNCALL_CALLBACK_X64_H_
-#define DYNCALL_CALLBACK_X64_H_
-
-#include "dyncall_callback.h"
-
-#include "dyncall_thunk.h"
-#include "dyncall_args_x64.h"
-
-
-struct DCCallback
-{
-  DCThunk  	         thunk;    // offset 0,  size 24
-  DCCallbackHandler* handler;  // offset 24
-  void*              userdata; // offset 32
-};
-
-#endif /* DYNCALL_CALLBACK_X64_H_ */
-
--- a/dyncallback/dyncall_callback_x86.c	Sat Sep 17 14:31:54 2016 +0200
+++ b/dyncallback/dyncall_callback_x86.c	Sat Oct 22 15:55:54 2016 +0200
@@ -6,7 +6,7 @@
  Description: Callback - Implementation for x86
  License:
 
-   Copyright (c) 2007-2015 Daniel Adler <dadler@uni-goettingen.de>,
+   Copyright (c) 2007-2016 Daniel Adler <dadler@uni-goettingen.de>,
                            Tassilo Philipp <tphilipp@potion-studios.com>
 
    Permission to use, copy, modify, and distribute this software for any
@@ -24,22 +24,27 @@
 */
 
 
-
-#include "dyncall_callback_x86.h"
+#include "dyncall_callback.h"
+#include "dyncall_alloc_wx.h"
+#include "dyncall_thunk.h"
 #include "dyncall_args_x86.h"
 
-#include "dyncall_alloc_wx.h"
-#include "dyncall_signature.h"
+/* Callback symbol. */
+extern void dcCallbackThunkEntry();
 
-/*
- * assembly thunk entry for callbacks
- */
+struct DCCallback
+{
+  DCThunk            thunk;         /* offset 0,  size 16 */
+  DCCallbackHandler* handler;       /* offset 16 */
+  DCArgsVT*          args_vt;       /* offset 20 */
+  size_t             stack_cleanup; /* offset 24 */
+  void*              userdata;      /* offset 28 */
+};
 
-extern void dcCallbackThunkEntry();
 
 /* compute stacksize for callee cleanup calling conventions:
  *
- * stdcall,fastcall_ms,fastcall_gnu
+ * cdecl,stdcall,thiscall_ms,fastcall_ms,fastcall_gnu
  */
 
 static int dcbCleanupSize_x86_cdecl(const char* signature)
--- a/dyncallback/dyncall_callback_x86.h	Sat Sep 17 14:31:54 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
-
- Package: dyncall
- Library: dyncallback
- File: dyncallback/dyncall_callback_x86.h
- Description: Callback - Header for x86
- License:
-
-   Copyright (c) 2007-2015 Daniel Adler <dadler@uni-goettingen.de>,
-                           Tassilo Philipp <tphilipp@potion-studios.com>
-
-   Permission to use, copy, modify, and distribute this software for any
-   purpose with or without fee is hereby granted, provided that the above
-   copyright notice and this permission notice appear in all copies.
-
-   THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-   WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-   MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-   ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-   WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-   ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-   OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-*/
-
-
-
-#ifndef DYNCALL_CALLBACK_X86_H_
-#define DYNCALL_CALLBACK_X86_H_
-
-#include "dyncall_callback.h"
-
-#include "dyncall_thunk.h"
-#include "dyncall_args_x86.h"
-
-struct DCCallback
-{
-  DCThunk            thunk;         /* offset 0,  size 16 */
-  DCCallbackHandler* handler;       /* offset 16 */
-  DCArgsVT*          args_vt;       /* offset 20 */
-  size_t             stack_cleanup; /* offset 24 */
-  void*              userdata;      /* offset 28 */
-};
-
-int dcCleanupSize_x86_cdecl   (const char* args_signature);
-int dcCleanupSize_x86_std     (const char* args_signature);
-int dcCleanupSize_x86_fast_ms (const char* args_signature);
-int dcCleanupSize_x86_fast_gnu(const char* args_signature);
-
-#endif /* DYNCALL_CALLBACK_X86_H_ */