Jason Lindquist (jlindquist) wrote,
Jason Lindquist

C Preprocessor predefined macros

I did some work on a Solaris driver on the Sparc architecture, and now I need to move it over to x86. A couple of memory operations are different, and I'd prefer to handle them automatically, without requiring a -D flag on the compile line.

With gcc, you want cpp -dM < /dev/null. With Sun's tools, you need a foo.c that contains a simple program (something with a main() function which does nothing but return 0.) Then you run CC -xdumpmacros foo.c

  • This is the KGB

    The question of from whence came KGB-FM finally popped into my head again while I was sitting in front of the computer, so I went looking for its…

  • Heineken? Fuck that shit!

    Raise a glass, noted San Diego brewmaster Karl Strauss has died in Milwaukee. Especially if you're Dennis Hopper, for Karl reformulated PABST BLUE…

  • Various Sorts of Hell

    Vendor Hell: At work, a vendor said they would sell us a chassis with an Intel shelf manager. Except they didn't say their definition of "with" is…

  • Post a new comment


    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.