Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 374667
Collapse All | Expand All

(-)rp-pppoe-3.10/src/configure.in.ori (-29 / +2 lines)
Lines 230-266 Link Here
230
esac
230
esac
231
231
232
dnl Figure out packing order of structures
232
dnl Figure out packing order of structures
233
AC_MSG_CHECKING([packing order of bit fields])
233
AC_C_BIGENDIAN()
234
AC_TRY_RUN([
235
union foo {
236
    struct bar {
237
	unsigned int ver:4;
238
	unsigned int type:4;
239
    } bb;
240
    unsigned char baz;
241
};
242
234
243
int
235
if test "$ac_cv_c_bigendian" = "yes" ; then
244
main(void)
245
{
246
    union foo x;
247
    x.bb.ver = 1;
248
    x.bb.type = 2;
249
    if (x.baz == 0x21) {
250
	return 1;
251
    } else if (x.baz == 0x12) {
252
	return 0;
253
    } else {
254
	return 2;
255
    }
256
}], rpppoe_cv_pack_bitfields=normal, rpppoe_cv_pack_bitfields=rev,
257
$ECHO "no defaults for cross-compiling"; exit 0)
258
259
if test "$rpppoe_cv_pack_bitfields" = "rev" ; then
260
	AC_MSG_RESULT(reversed)
261
	AC_DEFINE(PACK_BITFIELDS_REVERSED, 1, [Define if bitfields are packed in reverse order])
236
	AC_DEFINE(PACK_BITFIELDS_REVERSED, 1, [Define if bitfields are packed in reverse order])
262
else
263
	AC_MSG_RESULT(normal)
264
fi
237
fi
265
238
266
# Sigh... got to fix this up for tcl
239
# Sigh... got to fix this up for tcl

Return to bug 374667