Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help to compile curses (1982 Pavel Curtis Version) on SUSE 9.0

Status
Not open for further replies.

ozkender

Technical User
Aug 1, 2003
13
AU
Guys

I'm having some problems to compile the 1982 version of curses under SUSE 9.0
Yeah, I know.
you're probably going to say.
Why do you need that if you have ncurses already working with SUSE 9.0

The thing is our application uses the old curses to compile and if we swap to the new one they would be too many changes to make to our source code.

We have been compiling this curses version on several platforms with no problems until now.
including AIX, Solaris, SCO and red hat 9
but i'm not sure whats the problem with SUSE 9.

The problem during the compilation seems to be on the lib_tparm.c here's the copy of the error.

Please let me know if you have any idea.
Thanks for your help

sydtimslinux01:/usr/tims/v10/utils.src.linux/curses # make
cc -O -DNLS -DHAVE_SHM -DSRCDIR='"/usr/lib/terminfo"' -c -o lib_tparm.o lib_tp
arm.c
In file included from lib_tparm.c:127:
/usr/lib/gcc-lib/i586-suse-linux/3.3.1/include/varargs.h:4:2: #error "GCC no lon
ger implements <varargs.h>.&quot;
/usr/lib/gcc-lib/i586-suse-linux/3.3.1/include/varargs.h:5:2: #error &quot;Revise you
r code to use <stdarg.h>.&quot;
lib_tparm.c:131: error: parse error before &quot;va_dcl&quot;
lib_tparm.c:132: error: syntax error before '{' token
lib_tparm.c:146: warning: parameter names (without types) in function declaratio
n
lib_tparm.c:146: warning: data definition has no type or storage class
lib_tparm.c:147: error: conflicting types for `string'
lib_tparm.c:134: error: previous declaration of `string'
lib_tparm.c:147: error: `parms' undeclared here (not in a function)
lib_tparm.c:147: error: parse error before &quot;char&quot;
lib_tparm.c:179: warning: data definition has no type or storage class
lib_tparm.c:180: error: conflicting types for `bufptr'
lib_tparm.c:169: error: previous declaration of `bufptr'
lib_tparm.c:180: warning: data definition has no type or storage class
lib_tparm.c:182: error: parse error before &quot;while&quot;
lib_tparm.c:205: error: invalid type argument of `unary *'
lib_tparm.c:205: warning: data definition has no type or storage class
lib_tparm.c:206: error: parse error before &quot;if&quot;
lib_tparm.c:248: error: `__n' undeclared here (not in a function)
lib_tparm.c:248: warning: data definition has no type or storage class
lib_tparm.c:248: error: parse error before '}' token
lib_tparm.c:249: error: parse error before '.' token
lib_tparm.c:262: error: parse error before '.' token
lib_tparm.c:267: error: parse error before '.' token
lib_tparm.c:268: error: parse error before '++' token
lib_tparm.c:279: error: parse error before '.' token
lib_tparm.c:284: error: initializer element is not constant
lib_tparm.c:284: warning: data definition has no type or storage class
lib_tparm.c:285: error: parse error before &quot;if&quot;
lib_tparm.c:285: error: parse error before '.' token
lib_tparm.c:285: error: parse error before &quot;if&quot;
lib_tparm.c:285: error: parse error before '.' token
lib_tparm.c:290: error: redefinition of `x'
lib_tparm.c:284: error: `x' previously defined here
lib_tparm.c:290: error: initializer element is not constant
lib_tparm.c:290: warning: data definition has no type or storage class
lib_tparm.c:291: error: parse error before &quot;if&quot;
lib_tparm.c:291: error: parse error before '.' token
lib_tparm.c:296: error: redefinition of `x'
lib_tparm.c:290: error: `x' previously defined here
lib_tparm.c:296: error: initializer element is not constant
lib_tparm.c:296: warning: data definition has no type or storage class
lib_tparm.c:297: error: parse error before &quot;if&quot;
lib_tparm.c:297: error: parse error before '.' token
lib_tparm.c:302: error: redefinition of `x'
lib_tparm.c:296: error: `x' previously defined here
lib_tparm.c:302: error: initializer element is not constant
lib_tparm.c:302: warning: data definition has no type or storage class
lib_tparm.c:303: error: parse error before &quot;if&quot;
lib_tparm.c:303: error: parse error before '.' token
lib_tparm.c:308: error: redefinition of `x'
lib_tparm.c:302: error: `x' previously defined here
lib_tparm.c:308: error: initializer element is not constant
lib_tparm.c:308: warning: data definition has no type or storage class
lib_tparm.c:309: error: parse error before &quot;if&quot;
lib_tparm.c:309: error: parse error before '.' token
lib_tparm.c:314: error: redefinition of `x'
lib_tparm.c:308: error: `x' previously defined here
lib_tparm.c:314: error: initializer element is not constant
lib_tparm.c:314: warning: data definition has no type or storage class
lib_tparm.c:315: error: parse error before &quot;if&quot;
lib_tparm.c:315: error: parse error before '.' token
lib_tparm.c:320: error: redefinition of `x'
lib_tparm.c:314: error: `x' previously defined here
lib_tparm.c:320: error: initializer element is not constant
lib_tparm.c:320: warning: data definition has no type or storage class
lib_tparm.c:321: error: parse error before &quot;if&quot;
lib_tparm.c:321: error: parse error before &quot;if&quot;
lib_tparm.c:321: error: parse error before '.' token
lib_tparm.c:326: error: redefinition of `x'
lib_tparm.c:320: error: `x' previously defined here
lib_tparm.c:326: error: initializer element is not constant
lib_tparm.c:326: warning: data definition has no type or storage class
lib_tparm.c:327: error: parse error before &quot;if&quot;
lib_tparm.c:327: error: parse error before '.' token
lib_tparm.c:332: error: redefinition of `x'
lib_tparm.c:326: error: `x' previously defined here
lib_tparm.c:332: error: initializer element is not constant
lib_tparm.c:332: warning: data definition has no type or storage class
lib_tparm.c:333: error: parse error before &quot;if&quot;
lib_tparm.c:333: error: parse error before '.' token
lib_tparm.c:338: error: redefinition of `x'
lib_tparm.c:332: error: `x' previously defined here
lib_tparm.c:338: error: initializer element is not constant
lib_tparm.c:338: warning: data definition has no type or storage class
lib_tparm.c:339: error: parse error before &quot;if&quot;
lib_tparm.c:339: error: parse error before '.' token
lib_tparm.c:344: error: redefinition of `x'
lib_tparm.c:338: error: `x' previously defined here
lib_tparm.c:344: error: initializer element is not constant
lib_tparm.c:344: warning: data definition has no type or storage class
lib_tparm.c:345: error: parse error before &quot;if&quot;
lib_tparm.c:345: error: parse error before '.' token
lib_tparm.c:349: error: parse error before '.' token
lib_tparm.c:353: error: parse error before '.' token
lib_tparm.c:359: error: redefinition of `p'
lib_tparm.c:248: error: `p' previously defined here
lib_tparm.c:359: error: `__n' undeclared here (not in a function)
lib_tparm.c:359: warning: data definition has no type or storage class
lib_tparm.c:359: error: parse error before '}' token
lib_tparm.c:359: error: parse error before '++' token
lib_tparm.c:360: error: redefinition of `p'
lib_tparm.c:359: error: `p' previously defined here
lib_tparm.c:360: error: `__n' undeclared here (not in a function)
lib_tparm.c:360: error: `__n' undeclared here (not in a function)
lib_tparm.c:360: warning: data definition has no type or storage class
lib_tparm.c:360: error: parse error before '}' token
lib_tparm.c:360: error: parse error before '++' token
lib_tparm.c:377: warning: data definition has no type or storage class
lib_tparm.c:378: error: parse error before &quot;while&quot;
lib_tparm.c:405: error: redefinition of `level'
lib_tparm.c:377: error: `level' previously defined here
lib_tparm.c:405: warning: data definition has no type or storage class
lib_tparm.c:406: error: parse error before &quot;while&quot;
lib_tparm.c:439: error: conflicting types for `bufptr'
lib_tparm.c:180: error: previous declaration of `bufptr'
lib_tparm.c:439: warning: data definition has no type or storage class
lib_tparm.c:440: error: parse error before &quot;return&quot;
lib_tparm.c:443: warning: parameter names (without types) in function declaratio
n
lib_tparm.c:443: warning: data definition has no type or storage class
lib_tparm.c:444: error: parse error before '}' token
lib_tparm.c: In function `tgoto':
lib_tparm.c:465: warning: return makes pointer from integer without a cast
make: *** [lib_tparm.o] Error 1
sydtimslinux01:/usr/tims/v10/utils.src.linux/curses #
 
Code:
/usr/lib/gcc-lib/i586-suse-linux/3.3.1/include/varargs.h:5:2: #error &quot;Revise your code to use <stdarg.h>.&quot;
First, I'd try
Warning: ugly, untested, back it up first!
Code:
grep -r -i varargs\.h * | xargs perl -pi.bak -e 's/varargs\.h/stdarg.h/g'
Then try compiling the code and troubleshooting the errors from there.

Also a brief rundown in this manpage, not many solutions listed in it though:

----
JBR
 
Thanks for the reply mate
I found today that not only curses but some other c programs also fail because it seems the newer GCCs don't support varargs and stdarg is not completely compatible with it.

Now i'm looking for a GCC for SUSE 9 that would accept varargs or a varargs.h file that i could use with the gcc on SUSE 9.

Cheers.

PS: i might need to open another post
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top