In message <[email protected]> on Sat, 19 Mar 2011 18:19:43 
-0500 (CDT), "Steven M. Schweda" <[email protected]> said:

sms> > I'll try something out...
sms> 
sms>    I'd guess that one could (conditionally) 1) declare the real argv[]
sms> as 32-bit pointers, 2) construct a new argv[] made of 64-bit pointers,
sms> 3) copy the original 32-bit pointers into the new 64-bit array
sms> (remembering to add the (big) NULL at the end), and then pass that array
sms> along, much as is done for the new NULL-terminated array.

No need to declare the real argv anything more than it is right now.
I've moved your code to main() and added a bit of code so that the
argv copying is also done when sizeof(Argv) < __INITIAL_POINTER_SIZE/8
That was easy enough.  I did a little bit of renaming so the rest of
main() would accept this new variable.

sms> I'd expect that the most annoying part would be either always doing it
sms> (annoying), or else adding some kind of builder option (annoying) to
sms> specify when not to use "= ARGV" in the compiler commands, and defining
sms> a macro to tell the code that it needs to use the new work-around.  It's
sms> probably not hard to do, just not fun.  Possibly:
sms> 
sms> $!      ""      Compile with default (/NOPOINTER_SIZE).
sms> $!      32      Compile with /POINTER_SIZE=32 (SHORT).
sms> $!      64      Compile with /POINTER_SIZE=64[=ARGV] (LONG[=ARGV]).
sms> $!      64A     Compile with /POINTER_SIZE=64 (LONG).  For compilers
sms> $!              before HP C V7.3, where "=ARGV" is not legal.  (Adds
sms> $!              annoying work-around code to cope with the 32-bit
sms> $!              argv[] array.)
sms> 
sms> But all the "64" consumers would need to be changed to deal with the new
sms> "64A" option.

Naah...  this is only needed in makeapps.com, as far as I can tell,
and it wouldn't be too hard to have a spot in the code simply try the
following command:

        CC /POINTER_SIZE=64=ARGV NL:

and see if that gives back a condition code from DCL (facility number
3) or the compiler (facility number something different ;-)).  It's
really just one or the other and is pretty easy to do.

Getting to it.

Cheers,
Richard

-- 
Richard Levitte                         [email protected]
                                        http://richard.levitte.org/

"Life is a tremendous celebration - and I'm invited!"
-- from a friend's blog, translated from Swedish
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [email protected]

Reply via email to