Patch for solaris 2.x to provide nsswitch wins resolution

David Collier-Brown -- Customer Engineering David.Collier-Brown at sun.com
Mon Dec 16 20:26:00 GMT 2002


It probably belongs in autoconf, as Dan noted, with an #ifdef
THIS_OR_THAT
tha twill be set to true on both Solaris and HPUX.

Hey! Is it working on HPUX too??? That would be cool.

--dave



Steven Tamm wrote:
> 
> The configure.in script defines SUNOS5 if the host_os is solaris.  I wasn't
> questioning whether or not the predefine was correct, I was questioning
> whether it was appropriate, considering that in the configure.in
> winbind_nss_solaris is included on HPUX.  So the wins.c solaris portion
> probably also needs to include HPUX.
> 
> I don't know how the samba team is organized; but my assumption was that
> whoever was dealing with winbind and nsswitch would know what to do with the
> #ifdef, whether that would be place that code in a separate file called
> "wins_solaris.c" or create another AC_DEFINE like "NSSWITCH_CONSTR_STYLE" or
> something like that.
> 
> -Steven
> 
> >
> >       The predefined macros fron a Sun SC-series compilers are
> >                    __sun
> >                    __unix
> >                    __SUNPRO_C=0x500
> >                    __sparc (SPARC)
> >                    __sparcv9 (SPARC with -xarch=v9|v9a)
> >                    __i386 (x86)
> >                    __SVR4
> > Not that those are double leading underscores.  From memory
> > and a quick check on linux, GCC defines a partially overlapping
> > set including __linux and __sun.
> 
> To get a full list of possibly-predefined symbols on
> a particular installation of gcc, you can do something
> like
>   tr ' ' '\012' < /usr/lib/gcc-lib/i386-redhat-linux/3.2/specs | grep D
> | sed 's/.*-D//' | sort -u
> 
> but it's better to do autoconf-style feature tests than
> #if operatingsystem
> style tests, isn't it?
> 
> - Dan

-- 
David Collier-Brown,           | Always do right. This will gratify 
Sun Microsystems DCMO          | some people and astonish the rest.
Toronto, Ontario               |
(905) 415-2849 or x52849       | davecb at canada.sun.com



More information about the samba-technical mailing list