Re: #26769 [Opn->WFx]: 64 bit pointer

From: Date: Sat, 03 Jan 2004 10:28:15 +0000
Subject: Re: #26769 [Opn->WFx]: 64 bit pointer
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-6764@lists.php.net to get a copy of this message
Here is the code in exec.c, ----------------------------------------------------------- line# 586: pid_t child, wait_pid; line# 587: line# 588: child = (pid_t)rsrc->ptr;
pollita@php.net wrote:
rsrc->ptr is a generic use "bucket". Generally it's meant to hold a pointer to some data. In this case, pid_t is trusted to never have a larger storage size than void* (to do so would require 16-bit pointers and 32-bit PIDs or 32-bit pointers and 64-bit PIDs, etc...) so rather than malloc()ing a container for child, we just drop child itself into the pointer bucket.
I disagree: I think we should fix all harmless warnings we can identify, so the real issues stand out. Especially 64-bit issues, which will gain importance in the future, when 64-bit machines become the standard. How about doing this child = (long)rsrc->ptr; instead of the above ? -- Ard

« previous php.internals (#6764) next »