Write a program that will produce differing behaviors on as many different platforms as you can. Each differing platform awards one point (including an initial platform, meaning you can't score less than 1*). Mechanisms intended for determining the target/executing platform (e.g. through platform compilation statements or APIs like .NET's Environment.OSVersion.Platform) must not be used. The answer with the highest score wins (where upvotes are the tiebreakers).
For example, consider the following program in the Blub language:
print (1+2). If this program were to print
3 on every platform it is compiled and run on, its score would be 1. However, if, for any reason, it were to print
4 on PDP-11s, its score would be 2. Etc. But the following C snippet, for example, is an invalid entry:
#ifdef WIN32 ... #endif.
Distinct platform: the combination of a) the hardware architecture b) the OS and its MAJOR version number (e.g. 1.0.0 and 1.1.0 are considered the same OS)
Differing behavior: two behaviors are the same iff they produce similar side-effects (e.g. creating the same file with the same contents), or if the side-effect are errors of the same kind. For example, if a program segfaults on two distinct platforms, but the segfault message is different on these platforms, this is still considered the same behavior; while a program producing a zero-division error on one platform and a stack overflow (see what I did there? ;) error on another is producing different behavior.
All undefined behaviors are considered equivalent.
Program must be invoked in an equivalent manner on all platforms (however; this does mean you can pass command-line parameters if you so desire)
* Well, I guess you'd score zero if your program ran on zero platforms. But um... Yeah nevermind.