This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problems compiling programs with varargs under SUSE 9


Guys

I would really appreciate if you can give me any help on this since I'm
getting quite desperate.
 
I'm having some problems to compile the 1982 version of curses under
SUSE 9.0 and also some other programs thar are required for the
application my company sells.

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 + allour codes on several
platforms with no problems until now. including AIX, Solaris, SCO and
red hat 9.

The problems seems to be that the old curses and our applications use
include varargs.h which the GCC provided by SUSE 9 does not.

I already try editing the code and replacing varargs for stdargs and
managed to fix some of the errors, but some other just wont work.

I think stdarg.h doesn not support exactly the same varargs does.

My idea is to either install an older version of GCC on my suse box or
change the code.

Do you have any recommendations on what can I do?

I'm basically a sysadmin with not much experience in C so changing the
code wont be an option.

I sincerely appreciate your help

 

Regards

 

Mario

 

PS: Here goes a copy of the errors in compiling the curses, similar
errors are found on the other programs

 

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>."

/usr/lib/gcc-lib/i586-suse-linux/3.3.1/include/varargs.h:5:2: #error
"Revise you

r code to use <stdarg.h>."

lib_tparm.c:131: error: parse error before "va_dcl"

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 "char"

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 "while"

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 "if"

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 "if"

lib_tparm.c:285: error: parse error before '.' token

lib_tparm.c:285: error: parse error before "if"

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 "if"

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 "if"

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 "if"

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 "if"

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 "if"

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 "if"

lib_tparm.c:321: error: parse error before "if"

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 "if"

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 "if"

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 "if"

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 "if"

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 "while"

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 "while"

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 "return"

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 #


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]