diff options
author | hpa <hpa> | 2002-04-27 03:12:46 +0000 |
---|---|---|
committer | hpa <hpa> | 2002-04-27 03:12:46 +0000 |
commit | 4469dfa9e4f3c9f1852bdde0a103d86e7a0f05ab (patch) | |
tree | 33f2a7e518dff0a825cde7002b115137748078d4 | |
parent | 09f23d80a2697f8f536711f32cdc05f8751f1fe4 (diff) | |
download | syslinux.git-4469dfa9e4f3c9f1852bdde0a103d86e7a0f05ab.tar.gz syslinux.git-4469dfa9e4f3c9f1852bdde0a103d86e7a0f05ab.tar.xz syslinux.git-4469dfa9e4f3c9f1852bdde0a103d86e7a0f05ab.zip |
Don't rely on non-preprocessor references
-rw-r--r-- | isolinux.asm | 1 | ||||
-rw-r--r-- | ldlinux.asm | 1 | ||||
-rw-r--r-- | macros.inc | 14 | ||||
-rw-r--r-- | parseconfig.inc | 6 | ||||
-rw-r--r-- | pxelinux.asm | 1 |
5 files changed, 20 insertions, 3 deletions
diff --git a/isolinux.asm b/isolinux.asm index 47a3cced..48f8d25a 100644 --- a/isolinux.asm +++ b/isolinux.asm @@ -19,6 +19,7 @@ ; ; **************************************************************************** +%define IS_ISOLINUX 1 %include "macros.inc" %include "kernel.inc" %include "bios.inc" diff --git a/ldlinux.asm b/ldlinux.asm index 4f678815..cd22f429 100644 --- a/ldlinux.asm +++ b/ldlinux.asm @@ -26,6 +26,7 @@ ; ; **************************************************************************** +%define IS_SYSLINUX 1 %include "macros.inc" %include "kernel.inc" %include "bios.inc" @@ -21,6 +21,20 @@ %define _MACROS_INC ; +; Identify the module we're compiling; the "correct" should be defined +; in the module itself to 1 +; +%ifndef IS_SYSLINUX +%define IS_SYSLINUX 0 +%endif +%ifndef IS_PXELINUX +%define IS_PXELINUX 0 +%endif +%ifndef IS_ISOLINUX +%define IS_ISOLINUX 0 +%endif + +; ; For our convenience: define macros for jump-over-unconditinal jumps ; %macro jmpz 1 diff --git a/parseconfig.inc b/parseconfig.inc index bf9bd1c6..2b8f5a96 100644 --- a/parseconfig.inc +++ b/parseconfig.inc @@ -58,7 +58,7 @@ pc_append: cmp word [VKernelCtr],byte 0 ; ; "ipappend" command (PXELINUX only) ; -%if my_id == pxelinux_id +%if IS_PXELINUX pc_ipappend: call getint jc .err and bx,bx @@ -74,7 +74,7 @@ pc_ipappend: call getint ; ; "localboot" command (PXELINUX, ISOLINUX) ; -%if my_id == pxelinux_id || my_id == isolinux_id +%if IS_PXELINUX || IS_ISOLINUX pc_localboot: call getint cmp word [VKernelCtr],byte 0 ; ("label" section only) je .err @@ -265,7 +265,7 @@ pc_label: call commit_vk ; Commit any current vkernel mov cx,[AppendLen] mov [VKernelBuf+vk_appendlen],cx rep movsb -%if my_id == pxelinux_id ; Applies to pxelinux only +%if IS_PXELINUX ; PXELINUX only mov al,[IPAppend] ; Default ipappend==global ipappend mov [VKernelBuf+vk_ipappend],al %endif diff --git a/pxelinux.asm b/pxelinux.asm index 7ab0ed88..36278652 100644 --- a/pxelinux.asm +++ b/pxelinux.asm @@ -18,6 +18,7 @@ ; ; **************************************************************************** +%define IS_PXELINUX 1 %include "macros.inc" %include "kernel.inc" %include "bios.inc" |