[PHP-DEV] Re: Bug #2071 Updated: Compilation error in "functions/sysvshm.c" From: Mats Bredell (Mats.Bredell <email protected>)
Date: 08/20/99

Yes, that fixes it.

The conflict is in <sys/seg.h> which gets included through other include files:

-----8<-----
struct segstate {
        ushort segflag; /* type of segment */
        ushort num_segs; /* number of segments */
        union {
                uint mfileno; /* file discreptor */
                struct shmid_ds *shmptr; /* shared memory descriptor */
                ulong srval;
        } u_ptrs;
};
#define shm_ptr u_ptrs.shmptr
#define segfileno u_ptrs.mfileno
#define ss_srval u_ptrs.srval
-----8<-----

The name shm_ptr doesn't seem to appear in any other include files, so #undef'ing
it should work without causing any bad side effects.

/Mats

Bug Database wrote:

> ID: 2071
> Updated by: sas
> Reported By: Mats.Bredell <email protected>
> Status: Open
> Bug Type: Compile Failure
> Assigned To:
> Comments:
>
> If you add a
>
> #undef shm_ptr
>
> after the last #include line in the original sysvshm.c file, does it work then?
>
> Full Bug description available at: http://bugs.php.net/?id=2071

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>