mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-17 06:47:17 +00:00
Estimated hours taken: 10 Make everything in the runtime use MR_ prefixes, and make the compiler bootstrap with -DMR_NO_BACKWARDS_COMPAT. runtime/mercury_*.[ch] Add MR_ prefixes to all functions, global variables and almost all macros that could pollute the namespace. The (intentional) exceptions are 1. some function, variable, type and label names that already start with MR_, mercury_, Mercury or _entry; 2. some standard C macros in mercury_std.h; 3. the macros used in autoconfiguration (since they are used in scripts as well as the runtime, the MR_ prefix may not be appropriate for those). In some cases, I deleted things instead of adding prefixes if the "things" were obsolete and not user visible. runtime/mercury_bootstrap.h: Provide MR_-less forms of the macros for bootstrapping and for backward compatibility for user code. runtime/mercury_debug.[ch]: Add a FILE * parameter to a function that needs it. compiler/code_info.m: compiler/export.m: compiler/fact_table.m: compiler/llds.m: compiler/llds_out.m: compiler/pragma_c_gen.m: compiler/trace.m: Add MR_ prefixes to the C code generated by the compiler. library/*.m: Add MR_ prefixes to handwritten code. trace/mercury_trace_*.c: util/mkinit.c: Add MR_ prefixes as necessary. extras/concurrency/semaphore.m: Add MR_ prefixes as necessary.
24 lines
655 B
C
24 lines
655 B
C
/*
|
|
** Copyright (C) 1993-1995, 1997, 1999-2000 The University of Melbourne.
|
|
** This file may only be copied under the terms of the GNU Library General
|
|
** Public License - see the file COPYING.LIB in the Mercury distribution.
|
|
*/
|
|
|
|
/*
|
|
** File: mercury_dummy.h
|
|
** Author: fjh
|
|
**
|
|
** Global variables and functions used purely for the purpose
|
|
** of suppressing over-zealous compiler optimizations.
|
|
*/
|
|
|
|
#ifndef MERCURY_DUMMY_H
|
|
#define MERCURY_DUMMY_H
|
|
|
|
extern void MR_dummy_function_call(void);
|
|
extern void *MR_dummy_identify_function(void *);
|
|
extern void *volatile MR_global_pointer;
|
|
extern void *volatile MR_global_pointer_2;
|
|
|
|
#endif /* not MERCURY_DUMMY_H */
|