php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4259 compile failure in file.c line 1283
Submitted: 2000-04-27 09:40 UTC Modified: 2000-08-15 17:17 UTC
From: david dot munsey-kano at dartmouth dot edu Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.0 Release Candidate 1 OS: Digital UNIX V4.0F (Rev. 1229)
Private report: No CVE-ID: None
 [2000-04-27 09:40 UTC] david dot munsey-kano at dartmouth dot edu
Note that Digital Unix *does* have mmap. Here is the top of the man page:

NAME
  mmap - Maps file system object into virtual memory

SYNOPSIS

  #include <sys/mman.h>

  void *mmap (
          void *addr,
          size_t len,
          int prot,
          int flags,
          int filedes,
          off_t off );

  [Digital]  The following definition of the mmap() function does not conform
  to current standards and is supported only for backward compatibility (see
  standards(5)):

  caddr_t mmap (
          caddr_t addr,
          size_t len,
          int prot,
          int flags,
          int filedes,
          off_t off );

STANDARDS

  Interfaces documented on this reference page conform to industry standards
  as follows:

  mmap():  XPG4-UNIX

  Refer to the standards(5) reference page for more information about indus-
  try standards and associated tags.

  Standards: standards(5)
----------- end of man page text ---------

Here is the error I got:

cc: Error: file.c, line 1283: In this statement, "p" and "(-1)" cannot be compared for equality or inequality. (noequality)
                        if(p != MAP_FAILED) {
---------------------------^

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-24 18:26 UTC] derick@php.net
Looking through the code I find that p is a FILE* here (on line 1424) and that if MAP_FAILED is not defined it is defined to ((void *) -1). (On line 85).

Can you tell me what types the variabeles have with your source? Or if it still not builds with the latest release (PHP4.0.1pl2)?
 [2000-07-26 22:38 UTC] derick@php.net
David reports:

in my mman.h:

#define MAP_FAILED      (-1L)   /* unsuccessful return from mmap() */

This compile failure is still a problem with the 4.0.1pl2 release, which
I am using. I continue to comment
out the code as if my system does not support mmap().

Sorry I could not update the bug database myself, I seem to have lost
and forgotten my name & password!


 [2000-07-26 22:40 UTC] derick@php.net
Hello David,

could you try to remove this line from mman.h and see if the problem still occurs while compiling?


 [2000-08-15 17:17 UTC] waldschrott@php.net
Closed due to missing user feedback.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Jun 27 07:00:01 2026 UTC