Skip to content

Commit

Permalink
Minor header inclusion fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MisterDA committed Nov 4, 2024
1 parent 9ddc048 commit dba6165
Show file tree
Hide file tree
Showing 19 changed files with 23 additions and 21 deletions.
2 changes: 1 addition & 1 deletion otherlibs/runtime_events/caml/runtime_events_consumer.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@ CAMLextern runtime_events_error caml_runtime_events_read_poll(
void *callback_data,
uintnat max_events, uintnat *events_consumed);

#endif
#endif /* CAML_RUNTIME_EVENTS_CONSUMER_H */
5 changes: 4 additions & 1 deletion runtime/caml/addrmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@
/* special exception on linking described in the file LICENSE. */
/* */
/**************************************************************************/
#include "mlvalues.h"

#ifndef CAML_ADDRMAP_H
#define CAML_ADDRMAP_H

#include "mlvalues.h"

/* An addrmap is a value -> value hashmap, where
the values are blocks */

Expand Down Expand Up @@ -96,3 +97,5 @@ Caml_inline addrmap_iterator caml_addrmap_iterator(struct addrmap* t)


#endif

#endif /* CAML_ADDRMAP_H */
1 change: 0 additions & 1 deletion runtime/caml/alloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#ifndef CAML_ALLOC_H
#define CAML_ALLOC_H


#include "misc.h"
#include "mlvalues.h"

Expand Down
2 changes: 1 addition & 1 deletion runtime/caml/atomic_refcount.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ Caml_inline uintnat caml_atomic_refcount_incr(atomic_uintnat* refcount){

#endif /* CAML_INTERNALS */

#endif // CAML_ATOMIC_REFCOUNT_H
#endif /* CAML_ATOMIC_REFCOUNT_H */
2 changes: 1 addition & 1 deletion runtime/caml/bigarray.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,6 @@ CAMLextern intnat caml_ba_hash(value v);
CAMLextern void caml_ba_serialize(value, uintnat *, uintnat *);
CAMLextern uintnat caml_ba_deserialize(void * dst);

#endif
#endif /* CAML_INTERNALS */

#endif /* CAML_BIGARRAY_H */
1 change: 1 addition & 0 deletions runtime/caml/camlatomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
/* special exception on linking described in the file LICENSE. */
/* */
/**************************************************************************/

#ifndef CAML_ATOMIC_H
#define CAML_ATOMIC_H

Expand Down
4 changes: 2 additions & 2 deletions runtime/caml/codefrag.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,6 @@ extern unsigned char * caml_digest_of_code_fragment(struct code_fragment *);
/* Cleans up (and frees) removed code fragments. */
extern void caml_code_fragment_cleanup_from_stw_single(void);

#endif
#endif /* CAML_INTERNALS */

#endif
#endif /* CAML_CODEFRAG_H */
1 change: 0 additions & 1 deletion runtime/caml/custom.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ struct custom_operations {
extern "C" {
#endif


CAMLextern uintnat caml_custom_major_ratio;

CAMLextern value caml_alloc_custom(const struct custom_operations * ops,
Expand Down
4 changes: 2 additions & 2 deletions runtime/caml/fail.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Caml_inline value caml_get_value_or_raise (struct caml_result_private result)
}

#ifdef CAML_INTERNALS
// internals only, provided for backward-compatibility
/* internals only, provided for backward-compatibility */
Caml_inline value caml_result_get_encoded_exception(
struct caml_result_private result)
{
Expand All @@ -152,7 +152,7 @@ Caml_inline value caml_result_get_encoded_exception(
else
return result.data;
}
#endif // CAML_INTERNALS
#endif /* CAML_INTERNALS */

#ifdef __cplusplus
}
Expand Down
6 changes: 3 additions & 3 deletions runtime/caml/instrtrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

/* Trace the instructions executed */

#ifndef _instrtrace_
#define _instrtrace_
#ifndef CAML_INSTRTRACE_H
#define CAML_INSTRTRACE_H

#ifdef CAML_INTERNALS

Expand All @@ -33,4 +33,4 @@ void caml_event_trace (code_t pc);

#endif /* CAML_INTERNALS */

#endif
#endif /* CAML_INSTRTRACE_H */
2 changes: 1 addition & 1 deletion runtime/caml/memprof.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,6 @@ CAMLextern void caml_memprof_enter_thread(memprof_thread_t);

CAMLextern void caml_memprof_delete_thread(memprof_thread_t);

#endif
#endif /* CAML_INTERNALS */

#endif /* CAML_MEMPROF_H */
3 changes: 2 additions & 1 deletion runtime/caml/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
/* */
/**************************************************************************/

/* Platform-specific concurrency and memory primitives */

#ifndef CAML_PLAT_THREADS_H
#define CAML_PLAT_THREADS_H
/* Platform-specific concurrency and memory primitives */

#ifdef CAML_INTERNALS

Expand Down
1 change: 0 additions & 1 deletion runtime/caml/printexc.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#ifndef CAML_PRINTEXC_H
#define CAML_PRINTEXC_H


#include "misc.h"
#include "mlvalues.h"

Expand Down
1 change: 0 additions & 1 deletion runtime/caml/runtime_events.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#define CAML_RUNTIME_EVENTS_H

#include "mlvalues.h"
#include <stdint.h>

#ifdef CAML_INSTR
#define CAML_EV_ALLOC(s) caml_ev_alloc(s)
Expand Down
1 change: 1 addition & 0 deletions runtime/caml/shared_heap.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
/* special exception on linking described in the file LICENSE. */
/* */
/**************************************************************************/

#ifndef CAML_SHARED_HEAP_H
#define CAML_SHARED_HEAP_H

Expand Down
1 change: 1 addition & 0 deletions runtime/caml/signals.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ CAMLextern caml_result caml_process_pending_actions_res (void);
CAMLextern value caml_process_pending_actions_exn (void);

#ifdef CAML_INTERNALS

value caml_process_pending_actions_with_root (value extra_root); // raises
/* This is identical to [caml_process_pending_actions], except that it
registers its argument as a root and eventually returns it. This is
Expand Down
4 changes: 2 additions & 2 deletions runtime/caml/skiplist.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,6 @@ extern void caml_skiplist_empty(struct skiplist * sk);
} \
}

#endif
#endif /* CAML_INTERNALS */

#endif
#endif /* CAML_SKIPLIST_H */
1 change: 0 additions & 1 deletion runtime/caml/tsan.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ extern void __tsan_func_exit(void*);
extern void __tsan_func_entry(void*);
void __tsan_write8(void *location);


#endif /* CAML_INTERNALS */

#endif /* CAML_TSAN_H */
2 changes: 1 addition & 1 deletion runtime/caml/weak.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
#define CAML_WEAK_H

#include "mlvalues.h"
#include "memory.h"

#ifdef __cplusplus
extern "C" {
#endif

extern value caml_ephe_none;

#ifdef CAML_INTERNALS
Expand Down

0 comments on commit dba6165

Please sign in to comment.