Commit Graph

56 Commits (3d00fc8773fdbade2706916c6b89b912cba1fdf1)

Author SHA1 Message Date
Damien Doligez 5401ce8473 Update headers for the new license.
Remains to be done: remove all headers in testsuite/tests.
2016-02-18 16:59:16 +01:00
David Allsopp 12a9af9dd8 Use Microsoft UCRT snprintf rather than shim
Microsoft improved the support for C99 in Visual Studio 2015 and added a
compliant implementation of snprintf. Tightens the criteria for
`caml_snprintf` being used instead to ignore the Universal CRT.
2016-01-08 12:32:40 +00:00
David Allsopp 4bdb1461dd Use SUPPORT_DYNAMIC_LINKING in s.h on Windows
Ports some code from byterun/unix.c to byterun/win32.c to allow ocamlrun
to be built without FlexDLL on native Windows.
2016-01-04 11:22:57 +01:00
Xavier Leroy aacb6d5861 Branch win32-sockets: move do_read and do_write to OS-specific file.
This way, error handling is done in the OS-specific file (unix.c or win32.c).
In turn, this makes it easier to report a good Sys_error exception
in case of Win32 socket I/O error.
2015-12-04 11:40:11 +01:00
Xavier Leroy 15ac614a89 Experiment: Win32 sockets in non-synchronous mode.
This is an attempt to address PR#4466, #5325, #6771.  Not tested yet.
2015-11-30 11:42:16 +01:00
Mark Shinwell 8df90ef051 Port fix for GPR#191 to trunk (making gc.h and some part of memory.h public)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16163 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-06-08 13:21:42 +00:00
Gabriel Scherer 7ca29ef3f7 PR#5887: move the byterun/*.h headers to byterun/caml/*.h to avoid header name clashes
(Jérôme Vouillon and Adrien Nader and Peter Zotov)


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15757 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-27 14:41:49 +00:00
Damien Doligez cbfe627f92 merge changes from branch 4.02 from branching (rev 14852) to 4.02.0+rc1 (rev 15121)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15125 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-22 13:45:02 +00:00
Alain Frisch 44845c5c17 PR#6075: fix build under Windows (there is no caml_strbuf_free).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14651 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-22 09:41:24 +00:00
Xavier Leroy 774e30e138 PR#6075: avoid using unsafe C library functions (strcpy, strcat, sprintf).
An ISO C99-compliant C compiler and standard library is now assumed.
(Plus special exceptions for MSVC.)  In particular, emulation code for
64-bit integer arithmetic was removed, the C compiler must support a
64-bit integer type.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14607 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-15 17:09:13 +00:00
Alain Frisch f6890fbacb Remove debug.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13800 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-18 10:39:29 +00:00
Alain Frisch 58e99bd087 #4719: use GetModuleFileName to get an absolute path to the current executable under Windows.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13799 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-18 10:25:01 +00:00
Alain Frisch 4ae200a678 Commit Xavier's fix for #6032.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13750 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-06 11:39:51 +00:00
Wojciech Meyer dc9834c4a4 misc: replace stat_(alloc|free|resize) occurences with caml_stat_(...).
byterun/compatibility.h defines:
  #define stat_alloc caml_stat_alloc
  #define stat_free caml_stat_free
  #define stat_resize caml_stat_resize

Having the "caml_" prefix seems cleaner to me, it also avoids some
issues for cross-compilation but I don't remember well which ones.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13314 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-02-25 03:01:31 +00:00
Wojciech Meyer fb17e50db5 byterun/win32.c: use < > to #include flexdll.h instead of "".
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13313 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-02-25 03:01:28 +00:00
Alain Frisch 45936b5fa5 Fix #4887 (input_char after close_in crashes ocaml, msvc runtime). Patch by Christoph Bauer.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13257 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-17 09:04:53 +00:00
Damien Doligez def31744f9 remove all $Id keywords
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13013 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-15 17:50:56 +00:00
Gabriel Scherer 9c275a2e7a PR#5312: remove the Windows @responsefile feature, that conflicted
with '-w @...' command-line warning specifications [breaking change]

This change has relatively wide consequences as it modifies the windows
OCaml runtime: when the runtime computed the argument vector "argv"
passed to the program, it automatically expanded arguments of the form
@foo into the content of the filename "foo" (parsed as a sequence of
command-line arguments). This means that this "feature" was
automatically enabled for all user programs written in OCaml and
linking to the usual runtime.

This conflicted with the more recent feature of the OCaml *compiler*
(which is affected, as an OCaml program), that allows to pass warning
specifications of the form "-w @...", for example -w @ae. On windows,
it would try to replace it by the content of the file "ae", leading to
an error.

Given the warning specifications are widely used in OCaml programs
(causing silly Windows portability problems), and the @reponsefile is
anecdotical at best (at poll [1] on the Caml-list revealed no user
using this feature), it was decided to remove @responsefile
altogether.

[1] see mailing-list thread "[community poll for PR#5312] Do some
OCaml Windows users still use the @responsefile feature?"

This change affects all OCaml programs compiled under Windows. Users
previously relying on the @responsefile feature should now explicitely
expand Sys.argv themselves; use Arg.parse_argv to rerun Arg
command-line handlers on user-provided string arrays.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12685 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-07-10 11:33:00 +00:00
Xavier Leroy 44b6164bb0 Improve self-initialization of the Random module, using /dev/urandom
when available.  The changes in byterun/win32.c are untested.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12244 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-03-14 16:12:09 +00:00
Damien Doligez 3b507dd1aa renaming of Objective Caml to OCaml and cleanup of copyright headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11156 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-07-27 14:17:02 +00:00
Damien Doligez 04b1656222 clean up spaces and tabs
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9547 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-01-22 12:48:24 +00:00
Alain Frisch 291a4207ad Cleanup natdynlink. Automatic initialization of Dynlink (bytecode and native code). Do not use RTLD_GLOBAL for Dynlink.loadfile_private in native code.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8873 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2008-04-22 12:24:10 +00:00
Alain Frisch 5a93f85ed0 Use the new page classification method for the stack-overflow detection on win32.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8772 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2008-01-15 14:45:49 +00:00
Alain Frisch 3958a92c72 Merge the natdynlink branch into HEAD.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8477 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-11-06 15:16:56 +00:00
Xavier Leroy 578cc03cf9 Improved self initialization of PRNGs under Win32
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7944 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-03-01 13:37:39 +00:00
Xavier Leroy b4beb4dd7f Stack overflow detection not working under Win64
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7943 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-03-01 10:27:48 +00:00
Xavier Leroy efbf67e517 Tentative fix for PR#3927. To be tested.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7921 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-02-25 14:38:11 +00:00
Xavier Leroy 0eaf3a256c System stack overflow detection for Win32
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7814 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-01-29 15:50:45 +00:00
Xavier Leroy b52f0c3cbd Commentaires
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7669 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2006-10-03 11:52:40 +00:00
Xavier Leroy b3fb8243f8 Compatibilite avec Visual C++ version 6
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7660 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2006-10-01 15:40:28 +00:00
Xavier Leroy b0041ea963 Revised DLL loading: distinguish between loading for execution
(ocamlrun, dynlink, toplevel) and loading for checking the existence
of symbols (ocamlc).  This is needed for Windows with manifests and
not a bad idea for other platforms.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7656 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2006-09-28 21:36:38 +00:00
Xavier Leroy b7e2234b9a Suite nettoyage signaux (pour Win32)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7115 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2005-10-12 12:33:47 +00:00
Xavier Leroy 3de54dec26 Remplacement long/unsigned long par intnat/uintnat
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7064 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2005-09-22 14:21:50 +00:00
Damien Doligez 7519fe8f6b fusion des bugfixes de 3.08.2
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6694 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-11-25 00:06:06 +00:00
Damien Doligez 794c184571 suppression du support Mac OS 9
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6065 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-01-08 22:28:48 +00:00
Damien Doligez 5a678d29f5 depollution suite (PR#1914 et PR#1956)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6045 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-01-01 16:42:43 +00:00
Damien Doligez 331b2d89c3 depollution suite (PR#1914, PR#1956)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6044 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-12-31 14:20:40 +00:00
Damien Doligez 31943bac1d depollution suite (PR#1914 et PR#1956); byterun/weak.c: PR#1929 suite
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6041 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-12-29 22:15:02 +00:00
Damien Doligez a90b6e9d12 decontamination (PR#1914, PR#1956)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6022 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-12-15 18:37:24 +00:00
Xavier Leroy ac54fbc459 Code de debug laisse par erreur
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5550 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-05-12 14:21:20 +00:00
Xavier Leroy b0f0bcf00b La gestion des @responsefile est maintenant faite en Caml. Bug dans caml_read_directory.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5451 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-03-24 15:25:13 +00:00
Xavier Leroy 859efb84a8 Ajout de Sys.readdir
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5415 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-03-03 17:16:15 +00:00
Xavier Leroy 7816096a39 Parser les quotes dans les @responsefiles (PR#1424). A tester.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5271 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-11-17 16:34:08 +00:00
Jacques Garrigue 39c474b37f works better under Windows ME
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5034 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-07-24 03:22:38 +00:00
Xavier Leroy 491d1da4a1 Retour en arriere sur getenv qui va voir dans la registry: mieux vaut bien positionner les variables d'environnement depuis l'installeur
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4938 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-06-18 16:18:21 +00:00
Xavier Leroy 4cc760b856 Reactiver win32_system pour Mingw; MAJ de la longueur maxi de la ligne de commande (un peu plus de 4000 sous W2000)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4903 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-06-07 13:30:52 +00:00
Xavier Leroy a82c366504 Portage Mingw et revision du portage Win32/MSVC
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4899 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-06-07 09:49:45 +00:00
Xavier Leroy e5ba68d556 Pour getenv, consulter egalement la base de registres, ca facilitera le travail de l'installeur Windows
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4485 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-03-06 16:54:50 +00:00
Xavier Leroy 7501784c80 MAJ en-tetes pour mentionner la 'special exception' sur la LGPL
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4144 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2001-12-07 13:41:02 +00:00
Xavier Leroy e5bfb1566c Mauvaise expansion de dir/pattern (PR#680)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4067 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2001-12-03 09:52:10 +00:00