[m-rev.] for review: MinGW portability fixes
Fergus Henderson
fjh at cs.mu.OZ.AU
Sun Apr 8 23:20:34 AEST 2001
On 07-Apr-2001, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> util/Mmakefile:
> Compile mkinit.c with `mgnuc --no-ansi'.
> This is needed to get the declaration of `struct stat' on MinGW.
Estimated hours taken: 0.1
Branches: main, release
util/mkinit.c:
Rename `getline' as `get_line', to avoid name clash with glibc's
`getline'. This is needed now that mkinit.c is compiled with
`--no-ansi'.
Workspace: /home/hg/fjh/ws-hg3/mercury
Index: util/mkinit.c
===================================================================
RCS file: /home/mercury1/repository/mercury/util/mkinit.c,v
retrieving revision 1.72
diff -u -d -r1.72 mkinit.c
--- util/mkinit.c 2000/12/03 02:23:03 1.72
+++ util/mkinit.c 2001/04/08 13:17:48
@@ -279,7 +279,7 @@
int *num_bunches_ptr, int *num_calls_in_cur_bunch_ptr,
const char *suffix, bool only_full_module);
static void add_rl_data(char *data);
-static int getline(FILE *file, char *line, int line_max);
+static int get_line(FILE *file, char *line, int line_max);
static void *checked_malloc(size_t size);
/*---------------------------------------------------------------------------*/
@@ -732,7 +732,7 @@
return;
}
- while (getline(cfile, line, MAXLINE) > 0) {
+ while (get_line(cfile, line, MAXLINE) > 0) {
if (strncmp(line, init_str, init_strlen) == 0) {
int j;
@@ -909,7 +909,7 @@
/*---------------------------------------------------------------------------*/
static int
-getline(FILE *file, char *line, int line_max)
+get_line(FILE *file, char *line, int line_max)
{
int c, num_chars, limit;
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
| of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list