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
Index: T b

⟦835ab4e45⟧ TextFile

    Length: 564 (0x234)
    Types: TextFile
    Names: »bytesex.c«

Derivation

└─⟦4f9d7c866⟧ Bits:30007245 EUUGD6: Sikkerheds distributionen
    └─⟦this⟧ »./crack/Sources/bytesex.c« 

TextFile

#include <stdio.h>

main ()
{
    char *p;
    long int l;

    l = 'a' << 24 | 'b' << 16 | 'c' << 8 | 'd';
    p = (char *) &l;

    if (sizeof (long int) == 4)
    {
#ifndef GCC			/* gcc tends to make a botch of it */
	puts ("-DFDES_4BYTE");
#endif
    } else if (sizeof (long int) == 8)
    {
	puts ("-DFDES_8BYTE");
	l <<= 32;
    } else
    {
	printf ("-DFDES_%dBYTE%c", sizeof (long int), 10);
    }
    if (!strncmp (p, "abcd", 4))
    {
	puts ("-DBIG_ENDIAN");
    } else if (!strncmp (p, "dcba", 4))
    {
	puts ("-DLITTLE_ENDIAN");
    }
    exit (0);
}