Mark Klein ([log in to unmask]) wrote: : Rakesh Saha posts: : >I am passing a #define value in Makefile which is a long. : >The cpp seems to truncate the value passed. Here is what happened: I : >have -DTIME=841839547L in my Makefile. When I compile the value of TIME : >is shown as 841839, i.e I get TIME=841839. : >Can someone solve this mystery ? : Sure, use gcc! : Actually the problem is with the length of the command line buffer in : cpp. It is fairly limited. I don't recall the actual limit, but ran into : it myself when porting gcc. Further, I suspect that the compiler front : end is defining and including various standard definitions (e.g. : -D__hp3000s900__ -DMPEXL_SOURCE, etc) as well. This further reduces the : amount of space you have for your own defines. The command line limitation was somewhere between 255 and 279 characters. It is being addressed (SR #D500-261875); if this turns out to be your problem, there may already be a new version of the compiler and cpp available that has a larger command line buffer. Note that setting the CCOPTS environment variable does NOT work around this problem, as the compiler simply reads the variable and appends it to the INFO= string it passes to the preprocessor. You can work around it, however, by putting the #defines in your source file. Or, as Mark suggests, you can use gcc instead, which I ended up doing for other reasons that weren't so easily worked around. Mike ----------------------------------------------------------------- Mike Yawn email [log in to unmask] Hewlett-Packard HPDesk Mike YAWN/HP6650/21 Commercial Systems Division Voice (408) 447-4367 19447 Pruneridge Ave M/S 44UP Fax (408) 447-0312 Cupertino, CA 95014 -----------------------------------------------------------------