Forum: CFEngine Help Subject: CFE 3.3.5 compile issue - Solaris 10/Studio C Author: ChrisJ Link to topic: https://cfengine.com/forum/read.php?3,27150,27150#msg-27150
I'm building cfengine 3.3.5 in a Solaris 10 environment, with the Studio C compiler (12.3) and I get an "identifier redeclared" error with setlinebuf. "cf.defs.h", line 408: identifier redeclared: setlinebuf current : function(pointer to struct __FILE {int _cnt, pointer to unsigned char _ptr, pointer to unsigned char _base, unsigned char _flag, unsigned char _file, unsigned int __orientation :2, unsigned int __ionolock :1, unsigned int __seekable :1, unsigned int __extendedfd :1, unsigned int __xf_nocheck :1, unsigned int __filler :10}) returning void previous: function(pointer to struct __FILE {int _cnt, pointer to unsigned char _ptr, pointer to unsigned char _base, unsigned char _flag, unsigned char _file, unsigned int __orientation :2, unsigned int __ionolock :1, unsigned int __seekable :1, unsigned int __extendedfd :1, unsigned int __xf_nocheck :1, unsigned int __filler :10}) returning int : "/usr/include/stdio.h", line 260 c99: acomp failed for cf3parse.c gmake[2]: *** Error 1 gmake[1]: *** Error 2 gmake: *** Error 1 In the config.log, I found these entries: checking whether setlinebuf is declared... no checking for setlinebuf... yes I have setlinebuf(FILE) in my stdio.h header file, but the return type is "int". It looks like the configure test expects setlinebuf(FILE) to return void; and when that test fails, it creates its own version of setlinebuf, and then the compiler complains about having two functions with the same name. If my theory is correct, what's the easiest way to fix this? -- Chris _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine