From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <199608061506.IAA20823@panda.azstarnet.com> Date: Tue, 6 Aug 1996 08:06:10 -0700 From: David Mosberger-Tang Subject: Re: _printf_ problem >>>>> On Tue, 06 Aug 96 10:00:00 EDT, David Wild said: David> I finally tracked the problem down to this David> time (&t); printf ("%s\n ", ctime (&t) + 4); David> The "+ 4" should move pointer so the output is looks like David> "Aug 6 08:43:16" instead of "Tue Aug 6 08:43:16". Even David> though it compiles fine it will produce a memory violation David> when it gets run. I have never seen this happen on any other David> platform. David> Does anybody have a clue as to why this is happening. Both regular Red Hat 3.0.3 and GNU libc handle this correctly: $ cat t.c #include int main(int argc, char ** argv) { time_t t; time (&t); printf ("%s\n", ctime (&t) + 4); } $ gcc -O2 t.c $ ./a.out Aug 6 08:04:55 1996 $ What distribution/libc version are you using? --david -- To unsubscribe: mail -s unsubscribe axp-list-request@redhat.com < /dev/null