freebsd-nq/sys/netatm
Tom Rhodes a122cca953 These are changes to allow to use the Intel C/C++ compiler (lang/icc)
to build the kernel. It doesn't affect the operation if gcc.

Most of the changes are just adding __INTEL_COMPILER to #ifdef's, as
icc v8 may define __GNUC__ some parts may look strange but are
necessary.

Additional changes:
 - in_cksum.[ch]:
   * use a generic C version instead of the assembly version in the !gcc
     case (ASM code breaks with the optimizations icc does)
     -> no bad checksums with an icc compiled kernel
     Help from:		andre, grehan, das
     Stolen from: 	alpha version via ppc version
     The entire checksum code should IMHO be replaced with the DragonFly
     version (because it isn't guaranteed future revisions of gcc will
     include similar optimizations) as in:
        ---snip---
          Revision  Changes    Path
          1.12      +1 -0      src/sys/conf/files.i386
          1.4       +142 -558  src/sys/i386/i386/in_cksum.c
          1.5       +33 -69    src/sys/i386/include/in_cksum.h
          1.5       +2 -0      src/sys/netinet/igmp.c
          1.6       +0 -1      src/sys/netinet/in.h
          1.6       +2 -0      src/sys/netinet/ip_icmp.c

          1.4       +3 -4      src/contrib/ipfilter/ip_compat.h
          1.3       +1 -2      src/sbin/natd/icmp.c
          1.4       +0 -1      src/sbin/natd/natd.c
          1.48      +1 -0      src/sys/conf/files
          1.2       +0 -1      src/sys/conf/files.amd64
          1.13      +0 -1      src/sys/conf/files.i386
          1.5       +0 -1      src/sys/conf/files.pc98
          1.7       +1 -1      src/sys/contrib/ipfilter/netinet/fil.c
          1.10      +2 -3      src/sys/contrib/ipfilter/netinet/ip_compat.h
          1.10      +1 -1      src/sys/contrib/ipfilter/netinet/ip_fil.c
          1.7       +1 -1      src/sys/dev/netif/txp/if_txp.c
          1.7       +1 -1      src/sys/net/ip_mroute/ip_mroute.c
          1.7       +1 -2      src/sys/net/ipfw/ip_fw2.c
          1.6       +1 -2      src/sys/netinet/igmp.c
          1.4       +158 -116  src/sys/netinet/in_cksum.c
          1.6       +1 -1      src/sys/netinet/ip_gre.c
          1.7       +1 -2      src/sys/netinet/ip_icmp.c
          1.10      +1 -1      src/sys/netinet/ip_input.c
          1.10      +1 -2      src/sys/netinet/ip_output.c
          1.13      +1 -2      src/sys/netinet/tcp_input.c
          1.9       +1 -2      src/sys/netinet/tcp_output.c
          1.10      +1 -1      src/sys/netinet/tcp_subr.c
          1.10      +1 -1      src/sys/netinet/tcp_syncache.c
          1.9       +1 -2      src/sys/netinet/udp_usrreq.c

          1.5       +1 -2      src/sys/netinet6/ipsec.c
          1.5       +1 -2      src/sys/netproto/ipsec/ipsec.c
          1.5       +1 -1      src/sys/netproto/ipsec/ipsec_input.c
          1.4       +1 -2      src/sys/netproto/ipsec/ipsec_output.c

          and finally remove
            sys/i386/i386        in_cksum.c
            sys/i386/include     in_cksum.h
        ---snip---
 - endian.h:
   * DTRT in C++ mode
 - quad.h:
   * we don't use gcc v1 anymore, remove support for it
   Suggested by:	bde (long ago)
 - assym.h:
   * avoid zero-length arrays (remove dependency on a gcc specific
     feature)
     This change changes the contents of the object file, but as it's
     only used to generate some values for a header, and the generator
     knows how to handle this, there's no impact in the gcc case.
   Explained by:	bde
   Submitted by:	Marius Strobl <marius@alchemy.franken.de>
 - aicasm.c:
   * minor change to teach it about the way icc spells "-nostdinc"
   Not approved by:	gibbs (no reply to my mail)
 - bump __FreeBSD_version (lang/icc needs to know about the changes)

Incarnations of this patch survive gcc compiles since a loooong time,
I use it on my desktop. An icc compiled kernel works since Nov. 2003
(exceptions: snd_* if used as modules), it survives a build of the
entire ports collection with icc.

Parts of this commit contains suggestions or submissions from
Marius Strobl <marius@alchemy.franken.de>.

Reviewed by:	-arch
Submitted by:	netchild
2004-03-12 21:45:33 +00:00
..
ipatm Include <sys/malloc.h> for the declaration of malloc(), etc. instead 2003-11-14 21:02:10 +00:00
sigpvc Make the ioctl() interface cleaner with regard to types: use size_t 2003-07-29 13:32:10 +00:00
spans Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
uni Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
atm_aal5.c Introduce a MAC label reference in 'struct inpcb', which caches 2003-11-18 00:39:07 +00:00
atm_cm.c Silence a gcc-warning. Do this by inlining the macro-call. This is 2003-07-26 14:20:37 +00:00
atm_cm.h - Change the ATM stack functions to use intptr_t instead of int for opaque 2002-11-08 18:27:30 +00:00
atm_device.c Hand the packet to bpf not only in the LLC/SNAP case, but for all 2003-07-25 06:43:41 +00:00
atm_if.c Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
atm_if.h Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
atm_ioctl.h These are changes to allow to use the Intel C/C++ compiler (lang/icc) 2004-03-12 21:45:33 +00:00
atm_pcb.h
atm_proto.c Create a subtree 'harp' of the net sysctl tree. This uses a fixed 2003-07-24 10:33:01 +00:00
atm_sap.h
atm_sigmgr.h
atm_signal.c Use __FBSDID(). 2003-06-11 07:00:30 +00:00
atm_socket.c Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
atm_stack.h - Change the ATM stack functions to use intptr_t instead of int for opaque 2002-11-08 18:27:30 +00:00
atm_subr.c Don't remove the first mbuf in the chain if it got empty. 2004-02-21 12:55:07 +00:00
atm_sys.h
atm_usrreq.c Introduce a MAC label reference in 'struct inpcb', which caches 2003-11-18 00:39:07 +00:00
atm_var.h Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
atm_vc.h Make the ioctl() interface cleaner with regard to types: use size_t 2003-07-29 13:32:10 +00:00
atm.h
port.h There is no reason to be cute with ntohl(). Just call it directly rather 2003-02-23 22:26:39 +00:00
queue.h