mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-11 20:03:28 +00:00
Estimated hours taken: 6 Branches: main Get the sytem building under mingw and cygwin. README.MinGW: Document the new packages you need to install for the system to build. configure.in: runtime/mercury_conf.h.in: Test for the presence of the setenv and putenv functions. configure.in: Comment out some code which breaks with autoconf 2.60. runtime/mercury_runtime_util.c: runtime/mercury_runtime_util.h: Add MR_setenv which is an implementation of setenv in terms of either setenv or putenv. runtime/mercury_trace_base.c: Call MR_setenv. trace/Mmakefile: Mingw and cygwin only have flex 2.5.4 available, so use the options compatible with that version.
23 lines
686 B
C
23 lines
686 B
C
/*
|
|
** Copyright (C) 2001,2006 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.
|
|
*/
|
|
|
|
#ifndef MERCURY_RUNTIME_UTIL_H
|
|
#define MERCURY_RUNTIME_UTIL_H
|
|
|
|
#include <stdio.h>
|
|
|
|
#ifndef MR_HAVE_STRERROR
|
|
extern char *strerror(int errnum);
|
|
#endif
|
|
|
|
extern FILE *MR_checked_fopen(const char *filename, const char *message,
|
|
const char *mode);
|
|
extern void MR_checked_fclose(FILE *file, const char *filename);
|
|
extern void MR_checked_atexit(void (*func)(void));
|
|
extern int MR_setenv(const char *name, const char *value, int overwrite);
|
|
|
|
#endif /* MERCURY_RUNTIME_UTIL_H */
|