9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] testing and p9fmt
@ 2002-12-06  4:48 Russ Cox
  2002-12-06  5:25 ` William Josephson
  0 siblings, 1 reply; 3+ messages in thread
From: Russ Cox @ 2002-12-06  4:48 UTC (permalink / raw)
  To: 9fans

There are a few other things to be aware of.
First, fmtdef.h says

	typedef unsigned long uvlong;

which should be

	typedef unsigned long long uvlong;

on systems that support it.

As for nan, I believe that this

	static uvlong uvnan    = 0x7FF0000000000001;

	double
	nan(double *d)
	{
		USED(d);
		return *(double*)&uvnan;
	}

will work on systems that need it, as long as
they use 64-bit doubles.

Russ



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9fans] testing and p9fmt
  2002-12-06  4:48 [9fans] testing and p9fmt Russ Cox
@ 2002-12-06  5:25 ` William Josephson
  0 siblings, 0 replies; 3+ messages in thread
From: William Josephson @ 2002-12-06  5:25 UTC (permalink / raw)
  To: 9fans

On Thu, Dec 05, 2002 at 11:48:54PM -0500, Russ Cox wrote:
> There are a few other things to be aware of.

You also want to define _POSIX_SOURCE (e.g.
by using -posix on FreeBSD) or remove the
ushort and uint typedefs on BSD.

  -WJ


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [9fans] testing and p9fmt
@ 2002-12-06  4:18 Scott Schwartz
  0 siblings, 0 replies; 3+ messages in thread
From: Scott Schwartz @ 2002-12-06  4:18 UTC (permalink / raw)
  To: 9fans

This message is testing a change to our mailing list software.

But as long as you're listening, the p9fmt library that Russ mentioned
recently needs a tweak to compile on Solaris.

In strtod.c

#ifdef __sun
#include <sunmath.h>
#define nan(x) quiet_nan(0)
#endif

In Makefile,

CFLAGS=-xO5 -xipo=1
LDLIBS=/opt/SUNWspro/lib/libsunmath.so
LDFLAGS=-R/opt/SUNWspro/lib

[The -xipo flag turns on optimization in the linker, which is
more Plan 9-like. :)]



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-12-06  5:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-06  4:48 [9fans] testing and p9fmt Russ Cox
2002-12-06  5:25 ` William Josephson
  -- strict thread matches above, loose matches on Subject: below --
2002-12-06  4:18 Scott Schwartz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).