r10578: rename foreign library
authorKevin M. Rosenberg <kevin@rosenberg.net>
Wed, 8 Jun 2005 19:38:14 +0000 (19:38 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Wed, 8 Jun 2005 19:38:14 +0000 (19:38 +0000)
uffi/Makefile
uffi/Makefile.msvc
uffi/clsql-uffi-loader.lisp
uffi/clsql_uffi.c [new file with mode: 0644]
uffi/clsql_uffi.dll [new file with mode: 0644]
uffi/clsql_uffi.lib [new file with mode: 0644]
uffi/uffi.c [deleted file]
uffi/uffi.dll [deleted file]
uffi/uffi.lib [deleted file]

index 0a0568f26bf25084c53d36444836d792fdb8f3b4..a040b4da5fe02ca0d080644c21e11d5d0197e2bd 100644 (file)
@@ -17,7 +17,7 @@ SUBDIRS=
 
 include ../Makefile.common
 
-base=uffi
+base=clsql_uffi
 source=$(base).c
 object=$(base).o
 shared_lib=$(base).so
index 2edbfcad22131d7689bf5a7d8e2a99d498e5ed00..021be37cc83103b9ece10f31a0e4fb2598c6329d 100644 (file)
@@ -17,7 +17,7 @@
 ###########################################################################
 
 
-BASE=uffi
+BASE=clsql_uffi
 
 # Nothing to configure beyond here
 
index 05eee3f926be908134b02641d4c8e2b378b3b4b2..28fd7ed1833c7de37cc22c0df87606a549b7e90c 100644 (file)
                (length filenames) filenames))))
 
 (defvar *clsql-uffi-library-filenames*
-    (list #+(or 64bit x86-64) (make-pathname :name "uffi64"
+    (list #+(or 64bit x86-64) (make-pathname :name "clsql_uffi64"
                                              :directory clsql-uffi-system::*library-file-dir*)
-          #+(or 64bit x86-64) "uffi64"
-          (make-pathname :name "uffi"
+          #+(or 64bit x86-64) "clsql_uffi64"
+          (make-pathname :name "clsql_uffi"
                          :directory clsql-uffi-system::*library-file-dir*)
-          "uffi"))
+          "clsql_uffi"))
 
 (defvar *clsql-uffi-supporting-libraries* '("c")
   "Used only by CMU. List of library flags needed to be passed to ld to
diff --git a/uffi/clsql_uffi.c b/uffi/clsql_uffi.c
new file mode 100644 (file)
index 0000000..531abf0
--- /dev/null
@@ -0,0 +1,75 @@
+/****************************************************************************
+ * FILE IDENTIFICATION
+ *
+ *   Name:          clsql-uffi.c
+ *   Purpose:       Helper functions for common interfaces using UFFI
+ *   Programmer:    Kevin M. Rosenberg
+ *   Date Started:  Mar 2002
+ *
+ * $Id$
+ *
+ * This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
+ *
+ * CLSQL users are granted the rights to distribute and use this software
+ * as governed by the terms of the Lisp Lesser GNU Public License
+ * (http://opensource.franz.com/preamble.html), also known as the LLGPL.
+ ***************************************************************************/
+
+#ifdef WIN32
+#include <windows.h>
+
+BOOL WINAPI DllEntryPoint(HINSTANCE hinstdll, DWORD fdwReason,
+                         LPVOID lpvReserved)
+{
+        return 1;
+}
+       
+#define DLLEXPORT __declspec(dllexport)
+
+#else
+#define DLLEXPORT 
+#endif
+
+
+const unsigned int bitmask_32bits = 0xFFFFFFFF;
+#define lower_32bits(int64) ((unsigned int) int64 & bitmask_32bits)
+#define upper_32bits(int64) ((unsigned int) (int64 >> 32))
+
+/* Reads a 64-bit integer string, returns result as two 32-bit integers */
+
+DLLEXPORT
+unsigned int
+atol64 (const unsigned char* str, unsigned int* pHigh32)
+{
+#ifdef WIN32
+  __int64 result = 0;
+#else
+  long long result = 0;
+#endif
+  int minus = 0;
+  int first_char = *str;
+  if (first_char == '+')
+    ++str;
+  else if (first_char == '-') {
+    minus = 1;
+    ++str;
+  }
+
+  while (*str) {
+    int i = *str - '0';
+    if (i < 0 || i > 9) /* Non-numeric character -- quit */
+      break;
+    result = i + (10 * result);
+    str++;
+  }
+  if (minus)
+    result = -result;
+
+  *pHigh32 = upper_32bits(result);
+  return lower_32bits(result);
+}
+
+  
+  
+
+
diff --git a/uffi/clsql_uffi.dll b/uffi/clsql_uffi.dll
new file mode 100644 (file)
index 0000000..1c41270
Binary files /dev/null and b/uffi/clsql_uffi.dll differ
diff --git a/uffi/clsql_uffi.lib b/uffi/clsql_uffi.lib
new file mode 100644 (file)
index 0000000..a9ee8fe
Binary files /dev/null and b/uffi/clsql_uffi.lib differ
diff --git a/uffi/uffi.c b/uffi/uffi.c
deleted file mode 100644 (file)
index 531abf0..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/****************************************************************************
- * FILE IDENTIFICATION
- *
- *   Name:          clsql-uffi.c
- *   Purpose:       Helper functions for common interfaces using UFFI
- *   Programmer:    Kevin M. Rosenberg
- *   Date Started:  Mar 2002
- *
- * $Id$
- *
- * This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
- *
- * CLSQL users are granted the rights to distribute and use this software
- * as governed by the terms of the Lisp Lesser GNU Public License
- * (http://opensource.franz.com/preamble.html), also known as the LLGPL.
- ***************************************************************************/
-
-#ifdef WIN32
-#include <windows.h>
-
-BOOL WINAPI DllEntryPoint(HINSTANCE hinstdll, DWORD fdwReason,
-                         LPVOID lpvReserved)
-{
-        return 1;
-}
-       
-#define DLLEXPORT __declspec(dllexport)
-
-#else
-#define DLLEXPORT 
-#endif
-
-
-const unsigned int bitmask_32bits = 0xFFFFFFFF;
-#define lower_32bits(int64) ((unsigned int) int64 & bitmask_32bits)
-#define upper_32bits(int64) ((unsigned int) (int64 >> 32))
-
-/* Reads a 64-bit integer string, returns result as two 32-bit integers */
-
-DLLEXPORT
-unsigned int
-atol64 (const unsigned char* str, unsigned int* pHigh32)
-{
-#ifdef WIN32
-  __int64 result = 0;
-#else
-  long long result = 0;
-#endif
-  int minus = 0;
-  int first_char = *str;
-  if (first_char == '+')
-    ++str;
-  else if (first_char == '-') {
-    minus = 1;
-    ++str;
-  }
-
-  while (*str) {
-    int i = *str - '0';
-    if (i < 0 || i > 9) /* Non-numeric character -- quit */
-      break;
-    result = i + (10 * result);
-    str++;
-  }
-  if (minus)
-    result = -result;
-
-  *pHigh32 = upper_32bits(result);
-  return lower_32bits(result);
-}
-
-  
-  
-
-
diff --git a/uffi/uffi.dll b/uffi/uffi.dll
deleted file mode 100644 (file)
index 1c41270..0000000
Binary files a/uffi/uffi.dll and /dev/null differ
diff --git a/uffi/uffi.lib b/uffi/uffi.lib
deleted file mode 100644 (file)
index a9ee8fe..0000000
Binary files a/uffi/uffi.lib and /dev/null differ