~ubuntu-branches/debian/squeeze/openttd/squeeze

« back to all changes in this revision

Viewing changes to src/os/macosx/macos.h

  • Committer: Bazaar Package Importer
  • Author(s): Jordi Mallach, Matthijs Kooijman, Jordi Mallach
  • Date: 2009-04-15 18:22:10 UTC
  • mfrom: (1.1.6 upstream) (2.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090415182210-22ktb8kdbp2tf3bm
[ Matthijs Kooijman ]
* New upstream release.
* Remove Debian specific desktop file, upstream provides one now. 
* Add debian/watch file.

[ Jordi Mallach ]
* Bump Standards-Version to 3.8.1, with no changes required.
* Move to debhelper compat 7. Bump Build-Depends accordingly.
* Use dh_prep.
* Add "set -e" to config script.
* Remove a few extra doc files that get installed by upstream Makefile.
* Add more complete copyright information.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: macos.h 11521 2007-11-25 14:43:16Z egladil $ */
 
1
/* $Id: macos.h 15718 2009-03-15 00:32:18Z rubidium $ */
 
2
 
 
3
/** @file macos.h Functions related to MacOS support. */
2
4
 
3
5
#ifndef MACOS_H
4
6
#define MACOS_H
5
7
 
 
8
/* It would seem that to ensure backward compability we have to ensure that we have defined MAC_OS_X_VERSION_10_x everywhere */
 
9
#ifndef MAC_OS_X_VERSION_10_3
 
10
#define MAC_OS_X_VERSION_10_3 1030
 
11
#endif
 
12
 
 
13
#ifndef MAC_OS_X_VERSION_10_4
 
14
#define MAC_OS_X_VERSION_10_4 1040
 
15
#endif
 
16
 
 
17
#ifndef MAC_OS_X_VERSION_10_5
 
18
#define MAC_OS_X_VERSION_10_5 1050
 
19
#endif
 
20
 
 
21
 
6
22
/*
7
23
 * Functions to show the popup window
8
24
 * use ShowMacDialog when you want to control title, message and text on the button
15
31
void ShowMacAssertDialog ( const char *function, const char *file, const int line, const char *expression );
16
32
void ShowMacErrorDialog(const char *error);
17
33
 
18
 
// Since MacOS X users will never see an assert unless they started the game from a terminal
19
 
// we're using a custom assert(e) macro.
 
34
/* Since MacOS X users will never see an assert unless they started the game from a terminal
 
35
 * we're using a custom assert(e) macro. */
20
36
#undef assert
21
37
 
22
38
#ifdef NDEBUG
67
83
        return true;
68
84
}
69
85
 
 
86
/*
 
87
 * OSX 10.3.9 has blessed us with a signal with unlikable side effects.
 
88
 * The most problematic side effect is that it makes OpenTTD 'think' that
 
89
 * it's running on 10.4.0 or higher and thus tries to link to functions
 
90
 * that are only defined there. So now we'll remove all and any signal
 
91
 * handling for OSX < 10.4 and 10.3.9 works as it should at the cost of
 
92
 * not giving a useful error when savegame loading goes wrong.
 
93
 */
 
94
#define signal(sig, func) (MacOSVersionIsAtLeast(10, 4, 0) ? signal(sig, func) : NULL)
 
95
 
70
96
#endif /* MACOS_H */