[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] gawk 4.0.1 and 4.0.2 replace mktime bug
From: |
Aharon Robbins |
Subject: |
Re: [bug-gawk] gawk 4.0.1 and 4.0.2 replace mktime bug |
Date: |
Tue, 08 Jan 2013 19:04:34 +0200 |
User-agent: |
Heirloom mailx 12.5 6/20/10 |
Greetings. Thank you for the report.
> Date: Tue, 08 Jan 2013 13:45:28 +0000
> From: Alan <address@hidden>
> To: address@hidden
> Subject: [bug-gawk] gawk 4.0.1 and 4.0.2 replace mktime bug
>
> Hi,
>
> With gawk 4.0.1 and 4.0.2 there's a build problem when the mktime()
> function is deemed inadequate and replaced when linking statically.
>
> m68k-atari-mint-gcc -O2 -pipe -o gawk array.o awkgram.o builtin.o
> dfa.o ext.o field.o floatcomp.o gawkmisc.o getopt.o getopt1.o io.o
> main.o msg.o node.o random.o re.o regex.o replace.o version.o eval.o
> profile.o -lm -lpthread
> /j/usr/m68k-atari-mint/gcc-bin/4.6.3/../../../lib/gcc/m68k-atari-mint/4.6.3/../../../libc.a(localtime.o):localtime.o:(.text+0x3eb4):
>
> multiple definition of `_mktime'
> replace.o:replace.o:(.text+0x678): first defined here
>
> This is an Atari m68k platform.
>
> Alan.
The problem is that localtime.o on the Atari contains routines needed by
gawk along with mktime. The long term solution is to break up localtime.c
into several files, one per routine, so that there won't be conflicts.
The short term solution is for you to do something like
#if !defined(HAVE_MKTIME) && defined(magic_string_for_atari)
#define mktime gawk_mktime
#endif
in custom.h. This will rename gawk's provided version of mktime to
something that does not conflict.
Once you get this working, please submit a patch.
Thanks,
Arnold