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.


 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"));
 description="PostgreSQL bindings for OCaml"
 OCAMLMAKEFILE = ../OCamlMakefile
 SOURCES = postgresql.mli postgresql_stubs.c
-CFLAGS += -O2 -Wall -pedantic -Wno-long-long
+CFLAGS += -O2 -Wall -pedantic -Wno-long-long -fPIC -DPIC
 CLIBS   = pq
 RESULT  = postgresql


    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))
+# define __unused
+# define inline
 #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)
   v_empty_string = caml_alloc_string(0);
-CAMLprim value PQconndefaults_stub(value v_unit)
+CAMLprim value PQconndefaults_stub(value __unused v_unit)
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
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.