DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦a5ff295eb⟧ TextFile

    Length: 389 (0x185)
    Types: TextFile
    Names: »endian.c«

Derivation

└─⟦52210d11f⟧ Bits:30007239 EUUGD2: TeX 3 1992-12
    └─⟦c6be2784f⟧ »web2c-5.84b.tar.Z« 
        └─⟦5800b1b62⟧ 
            └─⟦this⟧ »src-5.84b/common/endian.c« 
└─⟦52210d11f⟧ Bits:30007239 EUUGD2: TeX 3 1992-12
    └─⟦63303ae94⟧ »unix3.14/TeX3.14.tar.Z« 
        └─⟦c58930e5c⟧ 
            └─⟦this⟧ »TeX3.14/common/endian.c« 

TextFile

/* endian -- determine whether we are running on a BigEndian or LittleEndian
   machine. */

#include <stdio.h>

void
main (argc, argv)
  int argc;
  char *argv[];
{
  union
  {
    long l;
    char c[sizeof (long)];
  } u;
  
  u.l = 1;
  
  if (u.c[0] == 0)
    printf ("#define WEB2C_BIG_ENDIAN 1\n");
  else
    printf ("/* This architecture is LittleEndian.  */\n");
  
  exit (0);
}