[noPoll] building nopoll library on unix other than linux

Peter Lecuyer lecuyer en progress.com
Jue Nov 3 22:13:59 CET 2016


I have been working with the nopoll library build 297.  Specifically, I 
am trying to build the shared object on several non-linux unix operating 
systems.  In order to deploy in production, I need to be able to build 
on the following platforms:

   linuxx86    64-bit
   ms windows  32-bit
   ms windows  64-bit
   solaris     64-bit
   hpuxai      64-bit
   aix         64-bit

I am having compilation problems in nopoll_conn.c due to the use of the 
SO_BINDTODEVICE socket option which is not universally available across 
different operating systems.  There are currently changes in this module 
to address this; however, the changes do not address the variations in 
the different unix platforms.

I have attempted to address this issue be adding additional compilation 
directives to identify the different unix operating systems (see 
attached version of nopoll_conn.c).  The intent of these changes is that 
the appropriate OS would be identified with a CFLAGS -D__xxx__ directive 
during the 'configure' phase.  This is similar to what you've done using 
the __APPLE__ directive, although a bit inconsistent with the 
NOPOLL_OS_xxx directives, so I wasn't entirely sure of the best way to 
address this.

In all fairness, I have no strong preference as to how these different 
platforms are distinguished ... only that I be able to avoid the 
SO_BINDTODEVICE sockopt on platforms that don't support it.  If you feel 
this issue should be addressed differently, that's fine with me as long 
as it can do what I need.  My implementation is just one possible way to 
handle it.

In addition, there is another instance of pointer arithmetic involving a 
void pointer which fails to compile on some of the stricter compilers. 
I have made a simple change to cast the pointer to (const char *) to 
resolve this.

I would like to submit my changes to you for review and inclusion into 
your official code base.  Once blessed, I would then be able to download 
the new distribution and build it universally.

Thank you for your time and assistance in this matter.  I look forward 
to hearing from you.

Regards,
Peter LEcuyer
Principal Software Engineer
Progress Software Corp.
lecuyer en progress.com


------------ próxima parte ------------
An embedded and charset-unspecified text was scrubbed...
Name: nopoll_conn.c
URL: <http://lists.aspl.es/pipermail/nopoll/attachments/20161103/63fcc202/attachment-0001.c>


Más información sobre la lista de distribución noPoll