[ntp:questions] NTP & PPS, part 2 ;)
E-Mail Sent to this address will be added to the BlackLists
Null at BlackList.Anitech-Systems.invalid
Thu Dec 18 20:55:18 UTC 2014
Rob wrote:> Martin Burnicki wrote:
>> Without having looked at the code base, I'm sure there are already
>> predefined macros available for the current build target/architecture.
>> So it should not be a problem to include something like
>> #if defined( SOLARIS )
>> #include <timepps_solaris.h>
>> #elif defined ( SCO )
>> #include <timepps_sco.h>
>> #elif defined ( LINUX ) || defined( FREEBSD )
>> #include <timepps.h>
>> If this piece of code is required more than once it should be put into a
>> common header file which is included in all places where this is
>> required. No duplicate code.
> The above is already there in the code, Martin.
> The only point is that these timepps-SunOS.h, timepps-SCO.h and
> timepps-Solaris.h files are included but the Linux version is not.
/* ppsapi_timepps.h */
* This logic first tries to get the timepps.h file from a standard
* location, and then from our include/ subdirectory.
# include <timepps.h>
# ifdef HAVE_SYS_TIMEPPS_H
# include <sys/timepps.h>
# ifdef HAVE_CIOGETEV
# include "timepps-SunOS.h"
# ifdef HAVE_TIOCGPPSEV
# include "timepps-Solaris.h"
# ifdef TIOCDCDTIMESTAMP
# include "timepps-SCO.h"
You are saying you want to add to the source tree ? ; e.g.
/* linuxpps.org/gitweb/?p=pps-tools */
/* http://linuxpps.org/gitweb/?p=pps-tools;a=blob_plain;f=timepps.h;hb=HEAD */
... and else include reference to it in ppsapi_timepps.h
at the end of the current include ifdefs ?
E-Mail Sent to this address <BlackList at Anitech-Systems.com>
will be added to the BlackLists.
More information about the questions