[hashcash] Re: hashcash BSD vs GNU getopt bug (Re: documentation bug?)
- From: Linus Nordberg <linus@xxxxxxxxxxx>
- To: hashcash@xxxxxxxxxxxxx
- Date: Sun, 29 Aug 2004 22:10:24 +0200
hal@xxxxxxxxxx ("Hal Finney") wrote
Sat, 28 Aug 2004 12:06:31 -0700 (PDT):
| I often struggle with writing cross platform code. I wonder if anyone
| has some good references or resources for this. I want to write command
| line code, or libraries suitable for linking with GUI front ends, which
| will compile on Linux, BSD, Windows and Macs.
|
| One useful piece of information would be symbols which are predefined
| by the compiler (or preprocessor), for each architecture, that would
| allow you to distinguish them reliably. I don't know a good source
| for this. I have found that _WIN32 is good for identifying Windows
| though.
Why not use Autoconf for testing for a *capability* instead of relying
on knowledge about some feature being present or not on a particular
platform? This technique has the advantage of being "future safe" --
when platform X implements function Y your package will use it.
- References:
- [hashcash] Re: hashcash BSD vs GNU getopt bug (Re: documentation bug?)
- From: "Hal Finney"
Other related posts:
- » [hashcash] hashcash BSD vs GNU getopt bug (Re: documentation bug?)
- » [hashcash] Re: hashcash BSD vs GNU getopt bug (Re: documentation bug?)
- » [hashcash] Re: hashcash BSD vs GNU getopt bug (Re: documentation bug?)
- » [hashcash] Re: hashcash BSD vs GNU getopt bug (Re: documentation bug?)
- » [hashcash] Re: hashcash BSD vs GNU getopt bug (Re: documentation bug?)
- » [hashcash] Re: hashcash BSD vs GNU getopt bug (Re: documentation bug?)
- [hashcash] Re: hashcash BSD vs GNU getopt bug (Re: documentation bug?)
- From: "Hal Finney"