Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 28979 - libnet-1.1.0 does not set the DEFINES macro correctly
Summary: libnet-1.1.0 does not set the DEFINES macro correctly
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: SpanKY
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 28982
  Show dependency tree
 
Reported: 2003-09-17 06:47 UTC by Brandy Westcott (RETIRED)
Modified: 2003-09-18 23:02 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brandy Westcott (RETIRED) gentoo-dev 2003-09-17 06:47:04 UTC
In libnet-1.1.0 the configure script will determine the 
LIBNET_CONFIG_DEFINES macro. One of the first tests is to determine 
the machine's "endianess": 
 
    if test $ac_cv_libnet_endianess = big ; then 
      ..... 
      LIBNET_CONFIG_DEFINES="$LIBNET_CONFIG_DEFINES -DLIBNET_BIG_ENDIAN" 
    elif test $ac_cv_libnet_endianess = lil ; then 
      ..... 
      LIBNET_CONFIG_DEFINES="$LIBNET_CONFIG_DEFINES -DLIBNET_LIL_ENDIAN" 
    fi 
 
This is all well and good until we come check if we are installing on a 
linux machine: 
 
    case "$target_os" in 
 
    *linux*) 
      ..... 
    LIBNET_CONFIG_DEFINES="-D_BSD_SOURCE -D__BSD_SOURCE -D__FAVOR_BSD" 
 
which of course reinitializes the DEFINES macro and we lose all knowledge 
of our machines "endianess". 
 
When libnet-1.1.0 is installed we can check the DEFINES macro: 
 
	# libnet-config --defines 
	-D_BSD_SOURCE -D__BSD_SOURCE -D__FAVOR_BSD -DHAVE_NET_ETHERNET_H 
 
Earlier versions of libnet in the portage tree are ok. 
Using libnet-1.0.2a-r3: 
 
	# libnet-1.0-config --defines 
	-D_BSD_SOURCE -D__BSD_SOURCE -D__FAVOR_BSD -DHAVE_NET_ETHERNET_H 
	-DLIBNET_LIL_ENDIAN
Comment 1 Brandy Westcott (RETIRED) gentoo-dev 2003-09-17 21:11:24 UTC
Looking closer it seems that the check for machine endianess is now 
deprecated in the configure script. From the libnet-1.1.0-beta1 
changelog: 
 
  The libnet-config script is no longer needed to specify machine 
  endianess -- that has been moved to libnet.h and done at compile time. 
  You can still use it to specify other CPP constants as well as 
  libraries. 
 
Comment 2 SpanKY gentoo-dev 2003-09-18 23:02:28 UTC
fixed in cvs