benzea / ptpv2d

Automatically exported from code.google.com/p/ptpv2d
2 stars 0 forks source link

Compile issues with GCC4.4.3 on linux. #2

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
1. Compile ptp2d with on a gcc 4.4.3 on Linux.  Fails compile due to INT_MAC 
not being defined.  

I added this statement in constants_dep.h to fix the problem.  

#ifndef INT_MAX 
#define INT_MAX __INT_MAX__
#endif

2. A compile also causes a warning with a */ included in a comment.  

A */ should be added at the end of the 2nd line.  

/* System Dependent (AKB: Moved from constants.h to constants_dep.h */
/* Defines for MPC831X implementation with Hardware timestampinng

Original issue reported on code.google.com by msab...@gmail.com on 19 May 2011 at 6:49

GoogleCodeExporter commented 8 years ago
1. Using the C standard library, instead of #ifndef INT_MAX, you could just

#include <limits.h>

Original comment by czing...@gmail.com on 31 May 2011 at 9:47

GoogleCodeExporter commented 8 years ago
Thanks for the change.  I'll take a look at this.

Of the 2 suggestions, it appears the include limits.h option appears to be the 
best.

Before making the change I want to look at what Windows supports for printf as 
I'm trying to keep as much as possible common.

Apologies for not responding sooner as I've been mostly focusing comments and 
responses from the ptpv2d google code group.  To join, go to the page, enter 
the info and please make sure you give a short description that you are working 
on ptpv2d (so I can filter out junk mailers).

Thanks,

Alan

Original comment by a...@bartky.net on 9 Jul 2011 at 11:59