/usr/lib/ocaml/caml/misc.h is in ocaml-nox 4.02.3-9.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | /***********************************************************************/
/* */
/* OCaml */
/* */
/* Xavier Leroy and Damien Doligez, INRIA Rocquencourt */
/* */
/* Copyright 1996 Institut National de Recherche en Informatique et */
/* en Automatique. All rights reserved. This file is distributed */
/* under the terms of the GNU Library General Public License, with */
/* the special exception on linking described in file ../LICENSE. */
/* */
/***********************************************************************/
/* Miscellaneous macros and variables. */
#ifndef CAML_MISC_H
#define CAML_MISC_H
#ifndef CAML_NAME_SPACE
#include "compatibility.h"
#endif
#include "config.h"
/* Standard definitions */
#include <stddef.h>
#include <stdlib.h>
/* Basic types and constants */
typedef size_t asize_t;
#ifndef NULL
#define NULL 0
#endif
#ifdef __GNUC__
/* Works only in GCC 2.5 and later */
#define Noreturn __attribute__ ((noreturn))
#else
#define Noreturn
#endif
/* Export control (to mark primitives and to handle Windows DLL) */
#define CAMLexport
#define CAMLprim
#define CAMLextern extern
/* Weak function definitions that can be overriden by external libs */
/* Conservatively restricted to ELF and MacOSX platforms */
#if defined(__GNUC__) && (defined (__ELF__) || defined(__APPLE__))
#define CAMLweakdef __attribute__((weak))
#else
#define CAMLweakdef
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* GC timing hooks. These can be assigned by the user.
[caml_minor_gc_begin_hook] must not allocate nor change any heap value.
The others can allocate and even call back to OCaml code.
*/
typedef void (*caml_timing_hook) (void);
extern caml_timing_hook caml_major_slice_begin_hook, caml_major_slice_end_hook;
extern caml_timing_hook caml_minor_gc_begin_hook, caml_minor_gc_end_hook;
extern caml_timing_hook caml_finalise_begin_hook, caml_finalise_end_hook;
/* Assertions */
#ifdef DEBUG
#define CAMLassert(x) \
((x) ? (void) 0 : caml_failed_assert ( #x , __FILE__, __LINE__))
CAMLextern int caml_failed_assert (char *, char *, int);
#else
#define CAMLassert(x) ((void) 0)
#endif
CAMLextern void caml_fatal_error (char *msg) Noreturn;
CAMLextern void caml_fatal_error_arg (char *fmt, char *arg) Noreturn;
CAMLextern void caml_fatal_error_arg2 (char *fmt1, char *arg1,
char *fmt2, char *arg2) Noreturn;
/* Safe string operations */
CAMLextern char * caml_strdup(const char * s);
CAMLextern char * caml_strconcat(int n, ...); /* n args of const char * type */
#ifdef __cplusplus
}
#endif
#endif /* CAML_MISC_H */
|