Closed Bug 16942 Opened 25 years ago Closed 25 years ago

configure fails to detect /dev/zero

Categories

(SeaMonkey :: Build Config, defect, P3)

Sun
Solaris
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: tar, Assigned: granrosebugs)

Details

SunOS fubar 5.6 Generic_105181-15 sun4u sparc SUNW,Ultra-5_10
39632 -rw-r--r--   1 tar      staff    20260098 Oct 18 11:59
mozilla-source-M10.tar.gz

Configuring with

env CXXFLAGS="-fpermissive" LDFLAGS="-s -R/usr/local/lib" ./configure
--enable-mailnews --enable-optimize --disable-debug

... produces a lot of output, then this:

checking for memmove... yes
checking how to call gettimeofday... two arguments
checking for /dev/zero... no
checking for valloc... yes

I *know* /dev/zero exists. :)  Here's the culprit, in configure:

  if test -f /dev/zero; then

On Solaris, /dev/zero is a symlink to ../devices/...

The test should be something like

  if test -c /dev/zero; then

or perhaps

  if test -f /dev/zero -o -c /dev/zero; then

That should work with most (all?) *NIXes, including Solaris.
set to M12.
Someone pointed this out on irc...shouldn't we just check for -r (readable)
instead?
sounds good to me.  if someone wants to review this, I'll check it in:

Index: configure
===================================================================
RCS file: /cvsroot/mozilla/configure,v
retrieving revision 1.418
diff -r1.418 configure
8143c8143
< if test -f /dev/zero; then
---
> if test -r /dev/zero; then
doh.  make that:
Index: configure.in
===================================================================
RCS file: /cvsroot/mozilla/configure.in,v
retrieving revision 1.507
diff -r1.507 configure.in
1791c1791
< if test -f /dev/zero; then
---
> if test -r /dev/zero; then
not m12 dogfood bug, pushing to M13.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
I checked in the patch and tested it under solaris and linux.  Works for me.
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.