Rajiv Andrade wrote:
> Hello Wyllys,
>
> On Fri, 2009-09-11 at 14:02 -0400, Wyllys Ingersoll wrote:
>> Attached are 2 updated patches for building trousers on Solaris.
>> These were made against the code from the 0.3.2 tarball.
>>
>> The 'daemon' function is not currently available in Solaris but it will
>> be coming soon, so it would be good to add a check for it in
>> the configure script and then "ifdef" for it in the tcsd code.
>>
>>
>> Signed-off-by: Wyllys Ingersoll <[email protected]>
>>
>> --- configure.in.orig Fri Sep 11 10:58:20 2009
>> +++ configure.in Fri Sep 11 10:57:59 2009
>> @@ -39,6 +39,10 @@
>> *ppc64* | *powerpc64* | *x86_64*)
>> CFLAGS="$CFLAGS -m64"
>> ;;
>> + *solaris*)
>> + CFLAGS="$CFLAGS -DSOLARIS"
>> + AM_CONDITIONAL(SOLARIS_BUILD, true)
>> + ;;
>> *)
>
> It doesn't seem the best place to set this special configure option
>
> Can't we autodetect it? Is there any file that we can only (and will
> always) find in solaris? If I'm not wrong we can only
> find /usr/include/sys/stream.h there, and can't find stdint.h only there
> (I'll need some help from you here). This way we can end up with:
>
> AC_CHECK_FILE(solaris_file, [AM_CONDITIONAL(SOLARIS, true)], [])
>
> And simplify the user's life.
There is probably a better way, I will think about it.
>
>> ;;
>> esac
>> @@ -347,7 +351,9 @@
>> AC_PROG_CC
>> AC_PROG_LIBTOOL
>>
>> -CFLAGS="$CFLAGS -I../include -W -Wall -Werror -Wno-unused-parameter
>> -Wsign-compare \
>> +AC_CHECK_FUNC(daemon, [ AC_DEFINE(HAVE_DAEMON, 1, [daemon function is
>> available]) ])
>> +
>> +CFLAGS="$CFLAGS -I../include \
>
> Why remove -Wall, -Werror, -Wno-unused-parameter and -Wsign-compare
> here?
Because not everyone builds with gcc. The Sun Studio C compilers don't
recognize those options.
The right fix is that the CFLAGS should be set based on the compiler being
used, but I was looking
for a quick fix.
-Wyllys
>
>> -DTCSD_DEFAULT_PORT=${TCSD_DEFAULT_PORT}
>> -DTSS_VER_MAJOR=${TSS_VER_MAJOR} \
>> -DTSS_VER_MINOR=${TSS_VER_MINOR} -DTSS_SPEC_MAJOR=${TSS_SPEC_MAJOR} \
>> -DTSS_SPEC_MINOR=${TSS_SPEC_MINOR}"
>>
>
>> --- src/tcsd/svrside.c.orig Fri Jun 5 12:45:50 2009
>> +++ src/tcsd/svrside.c Fri Sep 11 10:28:23 2009
>> @@ -26,6 +26,11 @@
>> #include <arpa/inet.h>
>> #include <errno.h>
>> #include <getopt.h>
>> +#if defined (SOLARIS)
>> +#include <fcntl.h>
>> +#include <priv.h>
>> +#endif
>> +
>> #include "trousers/tss.h"
>> #include "trousers_types.h"
>> #include "tcs_tsp.h"
>> @@ -212,12 +217,85 @@
>> fprintf(stderr, "\n");
>> }
>>
>> +#if defined (SOLARIS)
>> +
>
> #ifdef SOLARIS just to keep it compliant with the previous code
OK
>
> Thanks!
> Rajiv Andrade
> IBM LTC Security Development
>
>
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
TrouSerS-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/trousers-tech