Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
kit-ty-kate committed Sep 3, 2024
1 parent f9c7df9 commit db827a9
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 2 deletions.
41 changes: 40 additions & 1 deletion configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,11 @@ AS_CASE([${support_static},${enable_static}],
[no,yes],[AC_MSG_ERROR([--enable-static is not available on this platform (${TARGET}).])],
[*,auto],[enable_static=${default_static}])
AS_IF([test "${enable_static}" = yes],[
echo "(-noautolink -cclib -lunix -cclib -lmccs_stubs -cclib -lmccs_glpk_stubs -cclib -lsha_stubs ${platform_dependent_stuff})" > src/client/linking.sexp
AX_COMPARE_VERSION([$OCAMLVERSION], [lt], [5.0.0],[
echo "(-noautolink -cclib -lunix -cclib -lmccs_stubs -cclib -lmccs_glpk_stubs -cclib -lsha_stubs ${platform_dependent_stuff})" > src/client/linking.sexp
],[
echo "(-noautolink -cclib -lunixnat -cclib -lmccs_stubs -cclib -lmccs_glpk_stubs -cclib -lsha_stubs ${platform_dependent_stuff})" > src/client/linking.sexp
])
AC_MSG_RESULT([static])
],[
AC_MSG_RESULT([shared])
Expand Down
8 changes: 8 additions & 0 deletions src/core/dune
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@
(rule
(copy opamStubsTypes.ml opamStubsTypes.mli))

(rule
(enabled_if (< %{ocaml_version} "5.0"))
(action (copy opamStubs.ocaml4.ml opamStubs.win32.ml)))

(rule
(enabled_if (>= %{ocaml_version} "5.0"))
(action (copy opamStubs.ocaml5.ml opamStubs.win32.ml)))

(rule
(write-file opamCoreConfigDeveloper.ml
"let value = \"%{read-strings:developer}\""))
Expand Down
File renamed without changes.
17 changes: 17 additions & 0 deletions src/core/opamStubs.ocaml5.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
(**************************************************************************)
(* *)
(* Copyright 2018 MetaStack Solutions Ltd. *)
(* *)
(* All rights reserved. This file is distributed under the terms of the *)
(* GNU Lesser General Public License version 2.1, with the special *)
(* exception on linking described in the file LICENSE. *)
(* *)
(**************************************************************************)

include OpamStubsTypes
include OpamWin32Stubs
let getpid () = Int32.to_int (getCurrentProcessID ())

external win_create_process : string -> string -> string option ->
Unix.file_descr -> Unix.file_descr -> Unix.file_descr -> int
= "caml_unix_create_process" "caml_unix_create_process_native"

0 comments on commit db827a9

Please sign in to comment.