diff options
| author | Eli Zaretskii | 2014-09-25 12:34:53 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2014-09-25 12:34:53 +0300 |
| commit | db61bdb13915a15896ffb96d1ea3d23e00f4bf54 (patch) | |
| tree | 9fb3faba58b2ec6b9da881003bc742ea97df634f /src/w32term.h | |
| parent | 340e4cce7aaa1de72d384e4889f0f8aa65025874 (diff) | |
| download | emacs-db61bdb13915a15896ffb96d1ea3d23e00f4bf54.tar.gz emacs-db61bdb13915a15896ffb96d1ea3d23e00f4bf54.zip | |
Default to stack objects on DOS_NT platforms as well.
src/w32term.h (ALIGN_STACK) [__GNUC__]: Define to
__attribute__((force_align_arg_pointer)) for GCC 4.2 and later.
src/lisp.h (USE_STACK_LISP_OBJECTS): Remove the !DOS_NT condition.
src/w32proc.c (enum_locale_fn, enum_codepage_fn): Add the
ALIGN_STACK attribute.
src/w32fns.c (w32_monitor_enum): Add the ALIGN_STACK attribute.
src/w32uniscribe.c (add_opentype_font_name_to_list): Add the
ALIGN_STACK attribute.
src/w32font.c (add_font_name_to_list, add_font_entity_to_list)
(add_one_font_entity_to_list): Add the ALIGN_STACK attribute.
Diffstat (limited to 'src/w32term.h')
| -rw-r--r-- | src/w32term.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/w32term.h b/src/w32term.h index 0fabe12819c..fcadca6a9af 100644 --- a/src/w32term.h +++ b/src/w32term.h | |||
| @@ -22,6 +22,22 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 22 | #include "frame.h" | 22 | #include "frame.h" |
| 23 | #include "atimer.h" | 23 | #include "atimer.h" |
| 24 | 24 | ||
| 25 | /* Stack alignment stuff. Every CALLBACK function should have the | ||
| 26 | ALIGN_STACK attribute if it manipulates Lisp objects, because | ||
| 27 | Windows x86 32-bit ABI only guarantees 4-byte stack alignment, and | ||
| 28 | that is what we will get when a Windows function calls us. The | ||
| 29 | ALIGN_STACK attribute forces GCC to emit a preamble code to | ||
| 30 | re-align the stack at function entry. Further details about this | ||
| 31 | can be found in http://www.peterstock.co.uk/games/mingw_sse/. */ | ||
| 32 | #ifdef __GNUC__ | ||
| 33 | # if defined USE_STACK_LISP_OBJECTS && defined _W64 \ | ||
| 34 | && __GNUC__ + (__GNUC_MINOR__ > 1) >= 5 | ||
| 35 | # define ALIGN_STACK __attribute__((force_align_arg_pointer)) | ||
| 36 | # else | ||
| 37 | # define ALIGN_STACK | ||
| 38 | # endif /* USE_STACK_LISP_OBJECTS */ | ||
| 39 | #endif | ||
| 40 | |||
| 25 | 41 | ||
| 26 | #define BLACK_PIX_DEFAULT(f) PALETTERGB(0,0,0) | 42 | #define BLACK_PIX_DEFAULT(f) PALETTERGB(0,0,0) |
| 27 | #define WHITE_PIX_DEFAULT(f) PALETTERGB(255,255,255) | 43 | #define WHITE_PIX_DEFAULT(f) PALETTERGB(255,255,255) |