Commit 4762dd79 authored by gerd's avatar gerd

Port to OCamlnet-4 (and dropping support for OCamlnet-3)

Adding _oasis


git-svn-id: https://godirepo.camlcity.org/svn/wdialog/trunk@233 f54c9a64-0731-4a92-b797-30fd5898f27c
parent 55a56acc
......@@ -14,6 +14,10 @@ TOP_DIR=.
# default value if no Makefile.conf exists.
PKGLIST ?= wdialog
.PHONY: build
build: all
if ocamlopt >/dev/null 2>/dev/null; then $(MAKE) opt; fi
.PHONY: all
all:
#$(MAKE) -C tools all
......@@ -54,3 +58,12 @@ distclean:
rm -f Makefile.conf
#$(MAKE) -C tools distclean
for pkg in src/*/.; do test ! -f $$pkg/Makefile || $(MAKE) -C $$pkg distclean; done
_oasis: _oasis.in
v=`./configure -version 2>/dev/null` && \
sed -e "s/@VERSION@/$$v/" _oasis.in >_oasis
.PHONY: postconf
postconf:
v=`./configure -version 2>/dev/null` && \
echo 'pkg_version="$$v"' >>setup.data
OASISFormat: 0.4
Name: wdialog
Version: @VERSION@
Synopsis: Dialog-based web applications
Authors: Gerd Stolpmann
ConfType: custom (0.4)
BuildType: custom (0.4)
InstallType: custom (0.4)
BuildTools: make
License: GPL
OCamlVersion: >= 4.00.0
Homepage: http://projects.camlcity.org/projects/wdialog.html
XCustomConf: ./configure
PostConfCommand: make -s postconf
XCustomBuild: make build
XCustomInstall: make install
XCustomUninstall: make uninstall
Library "wdialog"
Path: src/wdialog
BuildDepends: pxp-engine >= 1.2
BuildDepends: netstring >= 4.0.0
BuildDepends: netcgi2 >= 4.0.0
BuildDepends: netstring-pcre >= 4.0.0
BuildDepends: pcre >= 0
Library "wd-inmemory-session"
Path: src/wd-inmemory-session
BuildDepends: wdialog
Library "wd-session-daemon"
Path: src/wd-session-daemon
BuildDepends: wdialog
BuildDepends: rpc
BuildDepends: inifiles
Library "wd-xmlcompiler"
Path: src/wd-xmlcompiler
Library "wdialog-p4"
Path: src/wdialog-p4
BuildDepends: camlp4
Executable "wdstated"
Path: src/wd-session-daemon
MainIs: wdstated.ml
......@@ -21,7 +21,7 @@ set_defaults () {
}
set_defaults
version="2.1.2+CVS"
version="2.1.4"
exec_suffix=""
ehelp_findlib="Enable/disable installation as findlib package"
......@@ -49,7 +49,7 @@ libdir=`ocamlc -where`/wdialog
perl_libdir=/usr/local/libexec/wdialog
# Packages to include anyway: (extended later)
requires="pxp-engine netstring unix pcre netcgi2"
requires="pxp-engine netstring unix pcre netcgi2 netstring-pcre"
libs_cma="unix.cma pcre.cma netstring.cma netcgi.cma pxp_engine.cma"
# For the META file of wdialog only:
......@@ -259,6 +259,18 @@ while [ "$#" -gt 0 ]; do
echo "$version"
exit 0
;;
-prefix|--prefix)
echo "(ignoring -prefix)" >&2
shift 2;;
--prefix=*)
echo "(ignoring -prefix)" >&2
shift;;
-destdir|--destdir)
echo "(ignoring -destdir)" >&2
shift 2;;
--destdir=*)
echo "(ignoring -destdir)" >&2
shift;;
*)
usage
esac
......
......@@ -5,6 +5,8 @@ set -e
version=`./configure -version 2>/dev/null`
destdir="wdialog-$version"
oasis setup
mkdir -p packages
rm -rf "packages/$destdir"
cp doc/README .
......
open Rtypes
open Xdr
open Netnumber
open Netxdr
open Rpc
open Rpc_server
open Wdstated_aux
......
......@@ -9,26 +9,26 @@
(* Type definitions *)
type ustring =
string
string
and st_get_result =
{
mutable result_code : int32;
mutable serialized_data : ustring;
}
{
mutable result_code : int32;
mutable serialized_data : ustring;
}
and get_result =
st_get_result
st_get_result
and t_Wdstated'V1'put_session'arg =
( ustring * ustring * int32 * ustring * ustring )
and t_Wdstated'V1'put_session'res =
int32
int32
and t_Wdstated'V1'replace_session'arg =
( ustring * ustring * int32 * ustring * ustring )
and t_Wdstated'V1'replace_session'res =
int32
int32
and t_Wdstated'V1'get_session'arg =
( ustring * ustring * ustring )
and t_Wdstated'V1'get_session'res =
get_result
get_result
;;
(* Constant definitions *)
......@@ -36,36 +36,36 @@ and t_Wdstated'V1'get_session'res =
(* Conversion functions *)
val _to_ustring : Xdr.xdr_value -> ustring;;
val _of_ustring : ustring -> Xdr.xdr_value;;
val _to_st_get_result : Xdr.xdr_value -> st_get_result;;
val _of_st_get_result : st_get_result -> Xdr.xdr_value;;
val _to_get_result : Xdr.xdr_value -> get_result;;
val _of_get_result : get_result -> Xdr.xdr_value;;
val _to_Wdstated'V1'put_session'arg : Xdr.xdr_value -> t_Wdstated'V1'put_session'arg;;
val _of_Wdstated'V1'put_session'arg : t_Wdstated'V1'put_session'arg -> Xdr.xdr_value;;
val _to_Wdstated'V1'put_session'res : Xdr.xdr_value -> t_Wdstated'V1'put_session'res;;
val _of_Wdstated'V1'put_session'res : t_Wdstated'V1'put_session'res -> Xdr.xdr_value;;
val _to_Wdstated'V1'replace_session'arg : Xdr.xdr_value -> t_Wdstated'V1'replace_session'arg;;
val _of_Wdstated'V1'replace_session'arg : t_Wdstated'V1'replace_session'arg -> Xdr.xdr_value;;
val _to_Wdstated'V1'replace_session'res : Xdr.xdr_value -> t_Wdstated'V1'replace_session'res;;
val _of_Wdstated'V1'replace_session'res : t_Wdstated'V1'replace_session'res -> Xdr.xdr_value;;
val _to_Wdstated'V1'get_session'arg : Xdr.xdr_value -> t_Wdstated'V1'get_session'arg;;
val _of_Wdstated'V1'get_session'arg : t_Wdstated'V1'get_session'arg -> Xdr.xdr_value;;
val _to_Wdstated'V1'get_session'res : Xdr.xdr_value -> t_Wdstated'V1'get_session'res;;
val _of_Wdstated'V1'get_session'res : t_Wdstated'V1'get_session'res -> Xdr.xdr_value;;
val _to_ustring : Netxdr.xdr_value -> ustring;;
val _of_ustring : ustring -> Netxdr.xdr_value;;
val _to_st_get_result : Netxdr.xdr_value -> st_get_result;;
val _of_st_get_result : st_get_result -> Netxdr.xdr_value;;
val _to_get_result : Netxdr.xdr_value -> get_result;;
val _of_get_result : get_result -> Netxdr.xdr_value;;
val _to_Wdstated'V1'put_session'arg : Netxdr.xdr_value -> t_Wdstated'V1'put_session'arg;;
val _of_Wdstated'V1'put_session'arg : t_Wdstated'V1'put_session'arg -> Netxdr.xdr_value;;
val _to_Wdstated'V1'put_session'res : Netxdr.xdr_value -> t_Wdstated'V1'put_session'res;;
val _of_Wdstated'V1'put_session'res : t_Wdstated'V1'put_session'res -> Netxdr.xdr_value;;
val _to_Wdstated'V1'replace_session'arg : Netxdr.xdr_value -> t_Wdstated'V1'replace_session'arg;;
val _of_Wdstated'V1'replace_session'arg : t_Wdstated'V1'replace_session'arg -> Netxdr.xdr_value;;
val _to_Wdstated'V1'replace_session'res : Netxdr.xdr_value -> t_Wdstated'V1'replace_session'res;;
val _of_Wdstated'V1'replace_session'res : t_Wdstated'V1'replace_session'res -> Netxdr.xdr_value;;
val _to_Wdstated'V1'get_session'arg : Netxdr.xdr_value -> t_Wdstated'V1'get_session'arg;;
val _of_Wdstated'V1'get_session'arg : t_Wdstated'V1'get_session'arg -> Netxdr.xdr_value;;
val _to_Wdstated'V1'get_session'res : Netxdr.xdr_value -> t_Wdstated'V1'get_session'res;;
val _of_Wdstated'V1'get_session'res : t_Wdstated'V1'get_session'res -> Netxdr.xdr_value;;
(* XDR definitions *)
val xdrt_ustring : Xdr.xdr_type_term;;
val xdrt_st_get_result : Xdr.xdr_type_term;;
val xdrt_get_result : Xdr.xdr_type_term;;
val xdrt_Wdstated'V1'put_session'arg : Xdr.xdr_type_term;;
val xdrt_Wdstated'V1'put_session'res : Xdr.xdr_type_term;;
val xdrt_Wdstated'V1'replace_session'arg : Xdr.xdr_type_term;;
val xdrt_Wdstated'V1'replace_session'res : Xdr.xdr_type_term;;
val xdrt_Wdstated'V1'get_session'arg : Xdr.xdr_type_term;;
val xdrt_Wdstated'V1'get_session'res : Xdr.xdr_type_term;;
val xdrt_ustring : Netxdr.xdr_type_term;;
val xdrt_st_get_result : Netxdr.xdr_type_term;;
val xdrt_get_result : Netxdr.xdr_type_term;;
val xdrt_Wdstated'V1'put_session'arg : Netxdr.xdr_type_term;;
val xdrt_Wdstated'V1'put_session'res : Netxdr.xdr_type_term;;
val xdrt_Wdstated'V1'replace_session'arg : Netxdr.xdr_type_term;;
val xdrt_Wdstated'V1'replace_session'res : Netxdr.xdr_type_term;;
val xdrt_Wdstated'V1'get_session'arg : Netxdr.xdr_type_term;;
val xdrt_Wdstated'V1'get_session'res : Netxdr.xdr_type_term;;
(* Program definitions *)
......
......@@ -5,44 +5,33 @@
* wdstated.x
*
************************************************************)
module Wdstated = struct
module Make'Wdstated(U'C:Rpc_client_pre.USE_CLIENT) = struct
module V1 = struct
open Wdstated_aux
let _program = program_Wdstated'V1
let create_client
?(esys = Unixqueue.create_unix_event_system())
?program_number
?version_number
connector
protocol =
Rpc_client.create ?program_number ?version_number esys connector protocol _program
let create_portmapped_client ?esys ?program_number ?version_number host protocol =
let port = Rpc_portmapper.port_of_program _program host protocol in
create_client ?esys ?program_number ?version_number (Rpc_client.Inet(host,port)) protocol
type t = U'C.t
let put_session client arg =
_to_Wdstated'V1'put_session'res (Rpc_client.sync_call client "put_session" (_of_Wdstated'V1'put_session'arg arg))
_to_Wdstated'V1'put_session'res (U'C.unbound_sync_call client _program "put_session" (_of_Wdstated'V1'put_session'arg arg))
let put_session'async client arg pass_reply =
Rpc_client.add_call client "put_session" (_of_Wdstated'V1'put_session'arg arg)
U'C.unbound_async_call client _program "put_session" (_of_Wdstated'V1'put_session'arg arg)
(fun g -> pass_reply (fun () -> _to_Wdstated'V1'put_session'res (g())))
let replace_session client arg =
_to_Wdstated'V1'replace_session'res (Rpc_client.sync_call client "replace_session" (_of_Wdstated'V1'replace_session'arg arg))
_to_Wdstated'V1'replace_session'res (U'C.unbound_sync_call client _program "replace_session" (_of_Wdstated'V1'replace_session'arg arg))
let replace_session'async client arg pass_reply =
Rpc_client.add_call client "replace_session" (_of_Wdstated'V1'replace_session'arg arg)
U'C.unbound_async_call client _program "replace_session" (_of_Wdstated'V1'replace_session'arg arg)
(fun g -> pass_reply (fun () -> _to_Wdstated'V1'replace_session'res (g())))
let get_session client arg =
_to_Wdstated'V1'get_session'res (Rpc_client.sync_call client "get_session" (_of_Wdstated'V1'get_session'arg arg))
_to_Wdstated'V1'get_session'res (U'C.unbound_sync_call client _program "get_session" (_of_Wdstated'V1'get_session'arg arg))
let get_session'async client arg pass_reply =
Rpc_client.add_call client "get_session" (_of_Wdstated'V1'get_session'arg arg)
U'C.unbound_async_call client _program "get_session" (_of_Wdstated'V1'get_session'arg arg)
(fun g -> pass_reply (fun () -> _to_Wdstated'V1'get_session'res (g())))
......@@ -51,4 +40,33 @@ module Wdstated = struct
end
module Wdstated = struct
module V1 = struct
module M'0 = Make'Wdstated(Rpc_client)
include M'0.V1
open Wdstated_aux
let _program = program_Wdstated'V1
let create_client
?(esys = Unixqueue.create_unix_event_system())
?program_number
?version_number
connector
protocol =
Rpc_client.create ?program_number ?version_number esys connector protocol _program
let create_portmapped_client ?esys ?program_number ?version_number host protocol =
create_client ?esys ?program_number ?version_number (Rpc_client.Portmapped host) protocol
let create_client2
?(esys = Unixqueue.create_unix_event_system())
?program_number
?version_number
mode2 =
Rpc_client.create2 ?program_number ?version_number mode2 _program esys
end
end
......@@ -5,23 +5,68 @@
* wdstated.x
*
************************************************************)
module Make'Wdstated(U'C:Rpc_client_pre.USE_CLIENT) : sig
module V1 : sig
open Wdstated_aux
type t = U'C.t
val _program : Rpc_program.t
val put_session :
U'C.t ->
t_Wdstated'V1'put_session'arg ->
t_Wdstated'V1'put_session'res
val put_session'async :
U'C.t ->
t_Wdstated'V1'put_session'arg ->
((unit -> t_Wdstated'V1'put_session'res) -> unit) ->
unit
val replace_session :
U'C.t ->
t_Wdstated'V1'replace_session'arg ->
t_Wdstated'V1'replace_session'res
val replace_session'async :
U'C.t ->
t_Wdstated'V1'replace_session'arg ->
((unit -> t_Wdstated'V1'replace_session'res) -> unit) ->
unit
val get_session :
U'C.t ->
t_Wdstated'V1'get_session'arg ->
t_Wdstated'V1'get_session'res
val get_session'async :
U'C.t ->
t_Wdstated'V1'get_session'arg ->
((unit -> t_Wdstated'V1'get_session'res) -> unit) ->
unit
end
end
module Wdstated : sig
module V1 : sig
open Wdstated_aux
type t = Rpc_client.t
val create_client :
?esys:Unixqueue.event_system ->
?program_number:Rtypes.uint4 ->
?version_number:Rtypes.uint4 ->
?program_number:Netnumber.uint4 ->
?version_number:Netnumber.uint4 ->
Rpc_client.connector ->
Rpc.protocol ->
Rpc_client.t
val create_portmapped_client :
?esys:Unixqueue.event_system ->
?program_number:Rtypes.uint4 ->
?version_number:Rtypes.uint4 ->
?program_number:Netnumber.uint4 ->
?version_number:Netnumber.uint4 ->
string ->
Rpc.protocol ->
Rpc_client.t
val create_client2 :
?esys:Unixqueue.event_system ->
?program_number:Netnumber.uint4 ->
?version_number:Netnumber.uint4 ->
Rpc_client.mode2 ->
Rpc_client.t
val _program : Rpc_program.t
val put_session :
Rpc_client.t ->
t_Wdstated'V1'put_session'arg ->
......
......@@ -10,8 +10,8 @@ module Wdstated : sig
open Wdstated_aux
val create_server :
?limit:int ->
?program_number:Rtypes.uint4 ->
?version_number:Rtypes.uint4 ->
?program_number:Netnumber.uint4 ->
?version_number:Netnumber.uint4 ->
proc_put_session : (t_Wdstated'V1'put_session'arg ->
t_Wdstated'V1'put_session'res) ->
proc_replace_session : (t_Wdstated'V1'replace_session'arg ->
......@@ -25,8 +25,8 @@ module Wdstated : sig
Rpc_server.t
val create_async_server :
?limit:int ->
?program_number:Rtypes.uint4 ->
?version_number:Rtypes.uint4 ->
?program_number:Netnumber.uint4 ->
?version_number:Netnumber.uint4 ->
proc_put_session : (Rpc_server.session ->
t_Wdstated'V1'put_session'arg ->
(t_Wdstated'V1'put_session'res -> unit) ->
......
......@@ -30,6 +30,8 @@ f Makefile
f Makefile.conf.sample
f Makefile.rules
f configure
f _oasis
f setup.ml
d examples
d examples/adder
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment