Please cc [EMAIL PROTECTED] in your replies. 2005/11/28, Eric House <[EMAIL PROTECTED]>: > I didn't think you meant "M$_" literally, but looked at munge, and > sure enough, you did. I agree with the sentiment, but that's an awful > lot of work to make people go through. How exactly do you call a > function named M$_closesocket in C? The parser won't accept anything > I can think of. Will I need a macro with ## in it?
I don't agree with the choice 'M$_' as a prefix only because it's unusual, but the upstream author of newlib for wince made this choice. I would have preferred '_winsock_'. The dollar sign is a legal character in C identifiers. Always try the simplest solution first, which in this case is, does it just work? $ echo 'int dollar$sign;' > dollar-sign.c $ gcc -c dollar-sign.c $ nm dollar-sign.o 00000004 C dollar$sign > Do I just rename WinMain, or do I need to call my existing WinMain from > a new main after coercing its parameters? My WinMain doesn't ignore > its parameters the way the sample apps can. This toolchain is really meant to be a POSIX development toolchain for the Pocket PC, and not a Microsoft API development toolchain for the Pocket PC. As such, wacky systems like WinMain are not supported. If all you need is the command line string, use GetCommandLineW. If you like, main can call WinMain with the result of GetCommandLineW as an argument. > > Sounds like you're getting much closer! Cheers, > > Yeah, it feels very close. I'll have time after work tonight, and may > well get it running. If nothing else the code will then be available as > an example of how this is done. Good stuff! Best of luck, Shaun