[syslinux] elflink: STORAGE_DEVICE_NUMBER proposal
Gene Cumm
gene.cumm at gmail.com
Wed Jul 4 18:07:44 PDT 2012
(I realize this may get delayed)
Per a2fd4f6, the mingw environment should provide a typedef for
STORAGE_DEVICE_NUMBER. However, several are known to not provide
this. If it exists, that .definition is preferable to one we may
create. As a result, a solution should be found for the broken
compilers.
I have a proposal for a solution that while not elegant does achieve this task:
A shell script, gcc-detect-storage_device_number.sh, would use gcc to
attempt to compile a tiny .c module that utilizes
STORAGE_DEVICE_NUMBER, deletes the temporary binary if present and the
script's return value is based on whether the compile is successful.
In win32/Makefile, the return is set to a variable. If no
STORAGE_DEVICE_NUMBER is defined, do something like "CFLAGS +=
-DSYSLINUX_TYPE_STORAGE_DEVICE_NUMBER=1".
In win32/syslinux.c, change the "#if 0" to "#if
SYSLINUX_TYPE_STORAGE_DEVICE_NUMBER >= 1"
--
-Gene
More information about the Syslinux
mailing list