FreeBSD/contrib/binutils/bfd/freebsd.h
/* Swap a magic number.  We accept either endian, whichever looks valid. */
Swap a magic number.  We accept either endian, whichever looks valid.
Swap a magic number . We accept either endian whichever looks valid .
static long
freebsd_swap_magic (void *ext)
{
  long linfo = bfd_getl32(ext);
  long binfo = bfd_getb32(ext);
  int lmagic = linfo & 0xffff;
  int bmagic = binfo & 0xffff;
  int lmagic_ok = lmagic == OMAGIC || lmagic == NMAGIC ||
    lmagic == ZMAGIC || lmagic == QMAGIC;
  int bmagic_ok = bmagic == OMAGIC || bmagic == NMAGIC ||
    bmagic == ZMAGIC || bmagic == QMAGIC;
  return bmagic_ok && !lmagic_ok ? binfo : linfo;
}
static long freebsd_swap_magic ( void * ext ) { long linfo = bfd_getl32 ( ext ) ; long binfo = bfd_getb32 ( ext ) ; int lmagic = linfo & 0xffff ; int bmagic = binfo & 0xffff ; int lmagic_ok = lmagic == OMAGIC || lmagic == NMAGIC || lmagic == ZMAGIC || lmagic == QMAGIC ; int bmagic_ok = bmagic == OMAGIC || bmagic == NMAGIC || bmagic == ZMAGIC || bmagic == QMAGIC ; return bmagic_ok && ! lmagic_ok ? binfo : linfo ; }
Swap a magic number.
Swap a magic number .