[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Info-cvs] CVS for MVS: Configure question

From: Derek R. Price
Subject: Re: [Info-cvs] CVS for MVS: Configure question
Date: Wed, 20 Sep 2000 15:51:00 -0400

address@hidden wrote:

> Thanks for the answer.  After poking through the I decided to do 
> a
> AC_TRY_COMPILE and key off the predefined macro __MVS_ just like CYGWIN32.  
> From
> there I and able to modify LIBS to include ../mvs/libmvs.a (which holds our
> platform specific abstracts).
> The biggest question left was this piece of code I needed to add to config.h:
> #if defined(__MVS__)
> /* Do EBCDIC to ASCII conversion */
> #define CVS_HTON(From, To, Size) mvsEtoA(From, To, Size)
> #define CVS_NTOH(From, To, Size) mvsAtoE(From, To, Size)
> extern void mvsEtoA(char *buff, char *outbuff, int size);
> extern void mvsAtoE(char *buff, char *outbuff, int size);

I think these kind of defines usually go in lib/system.h .

> /* MVS doesn't like you to overwrite getenv values.  Therefore we have
>    an abstract to copy the value into a buffer */
> #define CVS_GETENV mvsGetEnv
> extern char *mvsGetEnv(char *env);
> #else
> /* Do no conversion */
> #define CVS_HTON(From, To, Size)
> #define CVS_NTOH(From, To, Size)
> /* Use real getenv */
> #define CVS_GETENV getenv
> #endif
> This I added to acconfig.h after a @address@hidden
> This should probably be discuessed in cvs_devel.  Whom do I need to talk to to
> get submit access to this mailing list?

I thought at first this stuff could be more generic, but I think this is 
getenv behavior under gcc & Linux and apparently other systems too, so now I'm
suprised you need to do it for a port.  All the CVS 1.11 code I just glanced
through already seems to make the assumption that it doesn't own the pointers
getenv returns.  I think there were some issues with whether setenv copies your
pointer into the environment or holds onto it between glibc 2 and 2.1 but I 
find the documentation of that again so maybe I'm remembering another function.


Derek Price                      CVS Solutions Architect ( )
mailto:address@hidden     OpenAvenue ( )
There is not a truth existing which I fear or would wish unknown to the whole
                        - Thomas Jefferson to Henry Lee, 1826

reply via email to

[Prev in Thread] Current Thread [Next in Thread]