summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhpa <hpa>2002-04-27 03:12:46 +0000
committerhpa <hpa>2002-04-27 03:12:46 +0000
commit4469dfa9e4f3c9f1852bdde0a103d86e7a0f05ab (patch)
tree33f2a7e518dff0a825cde7002b115137748078d4
parent09f23d80a2697f8f536711f32cdc05f8751f1fe4 (diff)
downloadsyslinux-4469dfa9e4f3c9f1852bdde0a103d86e7a0f05ab.tar.gz
Don't rely on non-preprocessor references
-rw-r--r--isolinux.asm1
-rw-r--r--ldlinux.asm1
-rw-r--r--macros.inc14
-rw-r--r--parseconfig.inc6
-rw-r--r--pxelinux.asm1
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"
diff --git a/macros.inc b/macros.inc
index 5a02957f..3610ff54 100644
--- a/macros.inc
+++ b/macros.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"