Markus Mottl avatar Markus Mottl committed 04db0d2

Synced with Jane Street tree

Comments (0)

Files changed (6)

+2008-03-14:  Merged with Jane Street Capital version (some minor
+             cleanups).
+
 2008-03-10:  Improved portability to Windows.  Added support for
              parameters in queries.  Some internal cleanups.
 
-release-1-8-0
+release-1-8-1

examples/prompt_gtk/prompt_gtk.ml

 open GMain
 open Postgresql
 
-let _ =
+let () =
   if (Array.length Sys.argv <> 2) then (
     eprintf "Usage:  %s conninfo\n" Sys.argv.(0);
     exit 1)
   window#show ()
 
 let show_copy_out conn =
-  let window, hbox, sbv, sbh = make_window "Result (copy_out)" in
+  let window, hbox, _sbv, _sbh = make_window "Result (copy_out)" in
   let txt = GText.view ~packing:hbox#add () in
   let buf = txt#buffer in
   conn#copy_out (fun s -> buf#insert (s ^ "\n"));
 name="postgresql"
-version="1.8.0"
+version="1.8.1"
 description="PostgreSQL bindings for OCaml"
 requires="unix"
 archive(byte)="postgresql.cma"
 OCAMLMAKEFILE = ../OCamlMakefile
 
 SOURCES = postgresql.mli postgresql.ml postgresql_stubs.c
-CFLAGS += -O2 -Wall -pedantic -Wno-long-long
+CFLAGS += -O2 -Wall -pedantic -Wno-long-long -fPIC -DPIC
 CLIBS   = pq
 RESULT  = postgresql
 

lib/postgresql_stubs.c

    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 
-#ifndef __GNU__C
-#define inline
+#if __GNUC__ >= 3
+# define inline inline __attribute__ ((always_inline))
+# define __unused __attribute__ ((unused))
+#else
+# define __unused
+# define inline
 #endif
 
 #include <string.h>
 /* Cache for exceptions */
 static value *v_exc_Oid = NULL;  /* Exception [Oid] */
 
-CAMLprim value PQocaml_init(value v_unit)
+CAMLprim value PQocaml_init(value __unused v_unit)
 {
   caml_register_global_root(&v_empty_string);
   v_empty_string = caml_alloc_string(0);
   CAMLreturn(Val_unit);
 }
 
-CAMLprim value PQconndefaults_stub(value v_unit)
+CAMLprim value PQconndefaults_stub(value __unused v_unit)
 {
   CAMLparam0();
   CAMLlocal1(v_res);
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.