PDA

View Full Version : compile help


anon_cow
December 16th, 2000, 10:24 PM
all right, flame away...

I'm not a particularly good c programmer.
In fact, I've really only got a basic grasp
and don't fully understand pointers. I'm
getting some compile errors:

bash-2.04$ make LINUX=1
d_netfil.c: In function `FiletxTicker':
d_netfil.c:479: invalid initializer
d_netfil.c:488: invalid operands to binary >
d_netfil.c:490: incompatible types in assignment
make: *** [../objs/d_netfil.o] Error 1


The 'offending code' is:

#ifdef __OS2__
fpos_t size64;
#else
fpos_t size64=0;
#endif
transfer[i].currentfile=fopen(f->filename,"rb");
if(!transfer[i].currentfile)
I_Error("File %s not exist",f->filename);
fseek(transfer[i].currentfile,0,SEEK_END);
size=fgetpos(transfer[i].currentfile,&size64);
// WARNING fpos_t 64bit in some OS
#ifndef __OS2__
if(size64>MAXINT)
I_Error("Error : %s is too large\n",f->filename);
f->size=size64;
#else
f->size=size64._pos;
#endif


I'm compiling under i386/Linux.

Any takers?

-

Some poor dude.