SX-6 port of openssh, configure problems

Ajit Yashwant Vaishampayan, Noida ajith at noida.hcltech.com
Mon Jan 13 23:05:27 EST 2003


When we were porting OpenSSH on SX, we had similar problem. And when we did
#undef HAVE_B64_NTOP in config.h, we faced linking problem as b64_pton()
multiply defined, in base64.c and in libc.a. So we modified configure to
check both the functions b64_pton() and b64_ntop(). But we gave priority to
native function if available. Following are the diffs of three files we
changed

1. configure (line modified)

5949c5949
< for ac_func in arc4random atexit b64_ntop bcopy bindresvport_sa \
---
> for ac_func in arc4random atexit b64_ntop b64_pton bcopy bindresvport_sa \


2. config.h.in (Following lines added)

337a337,339
>
> /* Define if you have the `b64_pton' function. */
> #undef HAVE_B64_PTON


3. openbsd-compat/base64.c (Used the HAVE_B64_PTON in this file)

47c47
< #if !defined(HAVE_B64_NTOP) && !defined(HAVE___B64_NTOP)
---
> #if (!defined(HAVE_B64_NTOP) && !defined(HAVE___B64_NTOP)) ||
!defined(HAVE_B64_PTON)
131a132
> #if !defined(HAVE_B64_NTOP) && !defined(HAVE___B64_NTOP)
197a199
> #endif /* !defined(HAVE_B64_NTOP) && !defined(HAVE___B64_NTOP) */
198a201
> #if !defined(HAVE_B64_PTON)
314a318
> #endif /*!defined(HAVE_B64_PTON)*/
316c320
< #endif /* !defined(HAVE_B64_NTOP) && !defined(HAVE___B64_NTOP) */
---
> #endif /*(!defined(HAVE_B64_NTOP) && !defined(HAVE___B64_NTOP)) ||
!defined(HAVE_B64_PTON)*/


Hope this will be useful.


Regards,
Ajit


-----Original Message-----
From: Wendy Palm [mailto:wendyp at cray.com]
Sent: Saturday, January 11, 2003 4:14 AM
To: Jim Knoble
Cc: OpenSSH Development
Subject: Re: SX-6 port of openssh, configure problems


yes,  openbsd-compat/base64.c uses #if !defined(HAVE_B64_NTOP) &&
!defined(HAVE___B64_NTOP)
to define both b64_ntop() and b64_pton() functions.

i'll write up the patches to check for both functions.

hmm, should we use a native function if it exists, whether or not the other
does?
(i.e. in this case, should we use native b64_ntop()?)


Jim Knoble wrote:

> Circa 2003-01-10 16:04:47 -0600 dixit Wendy Palm:
> 
> : i found that the b64_ntop function truly does exist (libc.a)
> : but b64_pton truly doesn't.
> 
> Is there a replacement function in the OpenSSH tree?  If so, it sounds
> to me as if configure ought to look for both of them, and not use
> either function unless both are present natively---otherwise, use the
> replacement functions.
> 
> 


-- 
wendy palm
Cray OS Sustaining Engineering, Cray Inc.
wendyp at cray.com, 651-605-9154

_______________________________________________
openssh-unix-dev at mindrot.org mailing list
http://www.mindrot.org/mailman/listinfo/openssh-unix-dev




More information about the openssh-unix-dev mailing list