I think that it's better to avoid conditionals if at all possible.
The following change seems to allow things to build on linux-x86 and darwin-x86 (the two architectures I also have handy):
===========================================
diff -ur seq-2.0.99.orig/src/snc/snl.re seq-2.0.99/src/snc/snl.re
--- seq-2.0.99.orig/src/snc/snl.re 2010-05-17 09:13:31.000000000 -0700
+++ seq-2.0.99/src/snc/snl.re 2010-10-18 08:49:22.000000000 -0700
@@ -17,7 +17,6 @@
#define EOI 0
-typedef unsigned int uint;
typedef unsigned char uchar;
#define BSIZE 8192
===============================================
On Oct 17, 2010, at 5:33 PM, <[email protected]> wrote:
> Hi,
>
> When compiling the latest release of sncseq (2.0.99) on a MacOSX 10.6 (Snow Leopard) with EPICS base 3.14.11 the following error appears:
> ...
> 3 parsing conflicts.
> ../snl.re:20: error: redefinition of typedef ‘uint’
> ../types.h:40: error: previous declaration of ‘uint’ was here
> make[3]: *** [lexer.o] Error 1
> make[2]: *** [install.darwin-x86] Error 2
> make[1]: *** [snc.install] Error 2
> make: *** [src.install] Error 2
> ...
>
> Digging into the code I found two files (src/snc/snl.re and src/snc/types.h) defining uint as a new type unsigned int. On MacOSX (FreeBSD) that type is already defined in sys/types.h. I attached possible patch files that disable the re-definition of the uint type for Mac platforms. Please check if it is right, since these patch files only work on Mac and linux-x86_64 (debian lenny 64-bit), which are the platforms I can test. I haven't checked other FreeBSD platforms.
>
> Cheers,
> Juan Carlos.
> <snl.re.patch><types.h.patch>
> ----------
> Juan Carlos Guzman
> Software Engineer
> Australia Telescope National Facility
> CSIRO Astronomy and Space Science
> P.O.Box 76, Epping NSW 1710, Australia
> Phone: +61 2 9372 4457
> Fax: +61 2 9372 4310
> Email: [email protected]
>
>
>
>
>
>
--
Eric Norum
[email protected]
- Replies:
- Re: Error compiling sncseq-2.0.99 on MacOSX 10.6 (Snow Leopard) and possible patch (attached) Benjamin Franksen
- References:
- Error compiling sncseq-2.0.99 on MacOSX 10.6 (Snow Leopard) and possible patch (attached) Juan.Guzman
- Navigate by Date:
- Prev:
Epics C# Library - questions Jose Patricio Gonzalez
- Next:
Re: Problem in registerRecordDeviceDriver Andrew Johnson
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
<2010>
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Error compiling sncseq-2.0.99 on MacOSX 10.6 (Snow Leopard) and possible patch (attached) Juan.Guzman
- Next:
Re: Error compiling sncseq-2.0.99 on MacOSX 10.6 (Snow Leopard) and possible patch (attached) Benjamin Franksen
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
<2010>
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|