Jürg Billeter wrote:
On Die, 2006-03-14 at 22:01 +0100, Jürg Billeter wrote:

On Die, 2006-03-14 at 14:10 +0100, Jürg Billeter wrote:

* Verify headers with real applications
  Will do a full distro (800 packages) recompilation with these headers
sometime this week and fix headers resp. applications as necessary


About 700 packages have been built now. Additionally to the already
reported problems I've got two further problematic packages:

- xen: Uses linux/{if.h,ip.h,udp.h} instead of net/if.h,
netinet/{ip.h,udp.h}

- asterisk: Uses linux/compiler.h, include line could just be removed as
linux/ixjuser.h doesn't need the compiler.h defines due to the seds we
apply to the headers



Using the above notes, I've added the following to Jürg's version of the script so to create the 'compatibility' headers. Of course these could be created once and be copied too...just figured I'd add to the script so no local files must be kept around. Also, as Alexander mentioned in the other reply to this message, it might be best to just empty linux/compiler.h, as is done with llh instead of erroring out.

-- DJ Lucas


# Replace removed kernel headers that have a glibc equivelent.

# /usr/include/sys/*
for FILE in `echo linux/{acct.h,quota.h,resource.h,socket.h,stat.h,time.h,timex.h,un.h,wait.h}`
do
    GFILE=`echo "${FILE}" | sed '[EMAIL PROTECTED]@sys@'`
    echo '#if defined(__GNUC__) && !defined(__STRICT_ANSI__)' > ${FILE}
echo "#warning \"You should include <${GFILE}>. This time I will do it for you. \"" >> ${FILE}
    echo "#endif" >> ${FILE}
    echo "#include <${GFILE}>" >> ${FILE}
done

# /usr/include/net/*
for FILE in `echo linux/{if.h,route.h}`
do
    GFILE=`echo "${FILE}" | sed '[EMAIL PROTECTED]@net@'`
    echo '#if defined(__GNUC__) && !defined(__STRICT_ANSI__)' > ${FILE}
echo "#warning \"You should include <${GFILE}>. This time I will do it for you. \"" >> ${FILE}
    echo "#endif" >> ${FILE}
    echo "#include <${GFILE}>" >> ${FILE}
done

# /usr/include/netinet/*
for FILE in `echo linux/{in.h,ip.h,tcp.h,udp.h}`
do
    GFILE=`echo "${FILE}" | sed '[EMAIL PROTECTED]@netinet@'`
    echo '#if defined(__GNUC__) && !defined(__STRICT_ANSI__)' > ${FILE}
echo "#warning \"You should include <${GFILE}>. This time I will do it for you. \"" >> ${FILE}
    echo "#endif" >> ${FILE}
    echo "#include <${GFILE}>" >> ${FILE}
done

# /usr/include/*
for FILE in `echo linux/{dirent.h,elf.h,signal.h,utime.h}`
do
    GFILE=`echo "${FILE}" | sed '[EMAIL PROTECTED]/@@'`
    echo '#if defined(__GNUC__) && !defined(__STRICT_ANSI__)' > ${FILE}
echo "#warning \"You should include <${GFILE}>. This time I will do it for you. \"" >> ${FILE}
    echo "#endif" >> ${FILE}
    echo "#include <${GFILE}>" >> ${FILE}
done

# /usr/include/linux/ax25.h
echo '#if defined(__GNUC__) && !defined(__STRICT_ANSI__)' > linux/ax25.h
echo "#warning \"You should include <netax25/ax25.h>. This time I will do it for you. \"" >> linux/ax25.h
echo "#endif" >> linux/ax25.h
echo "#include <netax25/ax25.h>" >> linux/ax25.h

# /usr/include/linux/netrom.h
echo '#if defined(__GNUC__) && !defined(__STRICT_ANSI__)' > linux/netrom.h
echo "#warning \"You should include <netrom/netrom.h>. This time I will do it for you. \"" >> linux/netrom.h
echo "#endif" >> linux/netrom.h
echo "#include <netrom/netrom.h>" >> linux/netrom.h

# /usr/include/asm/io.h
echo '#if defined(__GNUC__) && !defined(__STRICT_ANSI__)' > asm/io.h
echo "#warning \"You should include <sys/io.h>. This time I will do it for you. \"" >> asm/io.h
echo "#endif" >> asm/io.h
echo "#include <sys/io.h>" >> asm/io.h

# /usr/include/linux/config.h
echo '#error "Compilation Aborted!"' > linux/config.h
echo '#error "Do not include <linux/config.h> in userspace!"' >> linux/config.h

# /usr/include/linux/compiler.h
echo '#error "Compilation Aborted!"' > linux/compiler.h
echo '#error "Do not include <linux/compiler.h> in userspace!"' >> linux/compiler.h


--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to