Skip to content

Commit

Permalink
Don't define CAML_NAME_SPACE on OCaml 5.00
Browse files Browse the repository at this point in the history
  • Loading branch information
MisterDA committed Feb 4, 2022
1 parent 1edb00f commit dab566f
Show file tree
Hide file tree
Showing 33 changed files with 5 additions and 36 deletions.
5 changes: 5 additions & 0 deletions src/unix/lwt_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,9 @@
#define NANOSEC(buf, field) 0.0
#endif

#include <caml/version.h>
#if OCAML_VERSION < 50000
#define CAML_NAME_SPACE
#endif

#endif // #ifndef _LWT_CONFIG_H_
2 changes: 0 additions & 2 deletions src/unix/lwt_libev_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

#if defined(HAVE_LIBEV)

#define CAML_NAME_SPACE

#include <assert.h>

#include <caml/alloc.h>
Expand Down
2 changes: 0 additions & 2 deletions src/unix/lwt_process_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

#include <lwt_unix.h>

#define CAML_NAME_SPACE
#include <caml/version.h>
#if OCAML_VERSION < 41300
#define CAML_INTERNALS
#endif
Expand Down
2 changes: 0 additions & 2 deletions src/unix/lwt_unix_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
#define _GNU_SOURCE
#define _POSIX_PTHREAD_SEMANTICS

#define CAML_NAME_SPACE

#include <caml/alloc.h>
#include <caml/bigarray.h>
#include <caml/callback.h>
Expand Down
1 change: 0 additions & 1 deletion src/unix/unix_c/unix_access_job.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/

/* Caml headers. */
#define CAML_NAME_SPACE
#include <lwt_unix.h>
#include <caml/memory.h>
#include <caml/alloc.h>
Expand Down
1 change: 0 additions & 1 deletion src/unix/unix_c/unix_chdir_job.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/

/* Caml headers. */
#define CAML_NAME_SPACE
#include <lwt_unix.h>
#include <caml/memory.h>
#include <caml/alloc.h>
Expand Down
1 change: 0 additions & 1 deletion src/unix/unix_c/unix_chmod_job.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/

/* Caml headers. */
#define CAML_NAME_SPACE
#include <lwt_unix.h>
#include <caml/memory.h>
#include <caml/alloc.h>
Expand Down
1 change: 0 additions & 1 deletion src/unix/unix_c/unix_chown_job.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/

/* Caml headers. */
#define CAML_NAME_SPACE
#include <lwt_unix.h>
#include <caml/memory.h>
#include <caml/alloc.h>
Expand Down
1 change: 0 additions & 1 deletion src/unix/unix_c/unix_chroot_job.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/

/* Caml headers. */
#define CAML_NAME_SPACE
#include <lwt_unix.h>
#include <caml/memory.h>
#include <caml/alloc.h>
Expand Down
1 change: 0 additions & 1 deletion src/unix/unix_c/unix_close_job.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/

/* Caml headers. */
#define CAML_NAME_SPACE
#include <lwt_unix.h>
#include <caml/memory.h>
#include <caml/alloc.h>
Expand Down
1 change: 0 additions & 1 deletion src/unix/unix_c/unix_fchmod_job.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/

/* Caml headers. */
#define CAML_NAME_SPACE
#include <lwt_unix.h>
#include <caml/memory.h>
#include <caml/alloc.h>
Expand Down
1 change: 0 additions & 1 deletion src/unix/unix_c/unix_fchown_job.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/

/* Caml headers. */
#define CAML_NAME_SPACE
#include <lwt_unix.h>
#include <caml/memory.h>
#include <caml/alloc.h>
Expand Down
1 change: 0 additions & 1 deletion src/unix/unix_c/unix_fdatasync_job.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/

/* Caml headers. */
#define CAML_NAME_SPACE
#include <lwt_unix.h>
#include <caml/memory.h>
#include <caml/alloc.h>
Expand Down
1 change: 0 additions & 1 deletion src/unix/unix_c/unix_fsync_job.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/

/* Caml headers. */
#define CAML_NAME_SPACE
#include <lwt_unix.h>
#include <caml/memory.h>
#include <caml/alloc.h>
Expand Down
1 change: 0 additions & 1 deletion src/unix/unix_c/unix_ftruncate_job.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/

/* Caml headers. */
#define CAML_NAME_SPACE
#include <lwt_unix.h>
#include <caml/memory.h>
#include <caml/alloc.h>
Expand Down
1 change: 0 additions & 1 deletion src/unix/unix_c/unix_link_job.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/

/* Caml headers. */
#define CAML_NAME_SPACE
#include <lwt_unix.h>
#include <caml/memory.h>
#include <caml/alloc.h>
Expand Down
1 change: 0 additions & 1 deletion src/unix/unix_c/unix_lseek_job.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/

/* Caml headers. */
#define CAML_NAME_SPACE
#include <lwt_unix.h>
#include <caml/memory.h>
#include <caml/alloc.h>
Expand Down
1 change: 0 additions & 1 deletion src/unix/unix_c/unix_mkdir_job.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/

/* Caml headers. */
#define CAML_NAME_SPACE
#include <lwt_unix.h>
#include <caml/memory.h>
#include <caml/alloc.h>
Expand Down
1 change: 0 additions & 1 deletion src/unix/unix_c/unix_mkfifo_job.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/

/* Caml headers. */
#define CAML_NAME_SPACE
#include <lwt_unix.h>
#include <caml/memory.h>
#include <caml/alloc.h>
Expand Down
1 change: 0 additions & 1 deletion src/unix/unix_c/unix_pread_job.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <caml/memory.h>
#include <caml/mlvalues.h>
#include <caml/unixsupport.h>
#include <caml/version.h>
#include <errno.h>
#include <string.h>

Expand Down
1 change: 0 additions & 1 deletion src/unix/unix_c/unix_read_job.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <caml/memory.h>
#include <caml/mlvalues.h>
#include <caml/unixsupport.h>
#include <caml/version.h>
#include <errno.h>
#include <string.h>

Expand Down
1 change: 0 additions & 1 deletion src/unix/unix_c/unix_rename_job.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/

/* Caml headers. */
#define CAML_NAME_SPACE
#include <lwt_unix.h>
#include <caml/memory.h>
#include <caml/alloc.h>
Expand Down
1 change: 0 additions & 1 deletion src/unix/unix_c/unix_rmdir_job.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/

/* Caml headers. */
#define CAML_NAME_SPACE
#include <lwt_unix.h>
#include <caml/memory.h>
#include <caml/alloc.h>
Expand Down
1 change: 0 additions & 1 deletion src/unix/unix_c/unix_symlink_job.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/

/* Caml headers. */
#define CAML_NAME_SPACE
#include <lwt_unix.h>
#include <caml/memory.h>
#include <caml/alloc.h>
Expand Down
1 change: 0 additions & 1 deletion src/unix/unix_c/unix_tcdrain_job.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/

/* Caml headers. */
#define CAML_NAME_SPACE
#include <lwt_unix.h>
#include <caml/memory.h>
#include <caml/alloc.h>
Expand Down
1 change: 0 additions & 1 deletion src/unix/unix_c/unix_tcflow_job.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/

/* Caml headers. */
#define CAML_NAME_SPACE
#include <lwt_unix.h>
#include <caml/memory.h>
#include <caml/alloc.h>
Expand Down
1 change: 0 additions & 1 deletion src/unix/unix_c/unix_tcflush_job.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/

/* Caml headers. */
#define CAML_NAME_SPACE
#include <lwt_unix.h>
#include <caml/memory.h>
#include <caml/alloc.h>
Expand Down
1 change: 0 additions & 1 deletion src/unix/unix_c/unix_tcsendbreak_job.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/

/* Caml headers. */
#define CAML_NAME_SPACE
#include <lwt_unix.h>
#include <caml/memory.h>
#include <caml/alloc.h>
Expand Down
1 change: 0 additions & 1 deletion src/unix/unix_c/unix_truncate_job.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/

/* Caml headers. */
#define CAML_NAME_SPACE
#include <lwt_unix.h>
#include <caml/memory.h>
#include <caml/alloc.h>
Expand Down
1 change: 0 additions & 1 deletion src/unix/unix_c/unix_unlink_job.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/

/* Caml headers. */
#define CAML_NAME_SPACE
#include <lwt_unix.h>
#include <caml/memory.h>
#include <caml/alloc.h>
Expand Down
1 change: 0 additions & 1 deletion src/unix/windows_c/windows_pread_job.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <caml/memory.h>
#include <caml/mlvalues.h>
#include <caml/unixsupport.h>
#include <caml/version.h>

#include "lwt_unix.h"

Expand Down
1 change: 0 additions & 1 deletion src/unix/windows_c/windows_read_job.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <caml/memory.h>
#include <caml/mlvalues.h>
#include <caml/unixsupport.h>
#include <caml/version.h>

#include "lwt_unix.h"

Expand Down
2 changes: 0 additions & 2 deletions src/unix/windows_c/windows_system_job.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

#if defined(LWT_ON_WINDOWS)

#define CAML_NAME_SPACE
#include <caml/version.h>
#if OCAML_VERSION < 41300
#define CAML_INTERNALS
#endif
Expand Down

0 comments on commit dab566f

Please sign in to comment.