X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=linux%2Fbsd_comp.c;h=a52c32357d510260e1a37edfe0c40180492c2f92;hp=db15f1bdcf17fac8cac52ffa84b96c44dcfebaca;hb=f201866a877a11896aa9deffe7343670d756ea6d;hpb=f0929f9c62155287b8e1162d080f1913ae8c31b9 diff --git a/linux/bsd_comp.c b/linux/bsd_comp.c index db15f1b..a52c323 100644 --- a/linux/bsd_comp.c +++ b/linux/bsd_comp.c @@ -39,10 +39,11 @@ /* * This version is for use with contiguous buffers on Linux-derived systems. * - * ==FILEVERSION 5== + * ==FILEVERSION 960924== * * NOTE TO MAINTAINERS: - * If you modify this file at all, increment the number above. + * If you modify this file at all, please set the number above to the + * date of the modification as YYMMDD (year month day). * bsd_comp.c is shipped with a PPP distribution as well as with * the kernel; if everyone increases the FILEVERSION number above, * then scripts can do the right thing when deciding whether to @@ -58,7 +59,6 @@ #include -#include #include #include #include @@ -77,6 +77,7 @@ #include #include #include +#include #include @@ -141,14 +142,16 @@ struct bsd_dict { union { /* hash value */ unsigned long fcode; struct { -#ifndef BIG_ENDIAN_BITFIELD /* Little endian order */ +#if defined(__LITTLE_ENDIAN) /* Little endian order */ unsigned short prefix; /* preceding code */ unsigned char suffix; /* last character of new code */ unsigned char pad; -#else /* Big endian order */ +#elif defined(__BIG_ENDIAN) /* Big endian order */ unsigned char pad; unsigned char suffix; /* last character of new code */ unsigned short prefix; /* preceding code */ +#else +#error Endianness not defined... #endif } hs; } f; @@ -249,7 +252,6 @@ bsd_clear(struct bsd_db *db) db->n_bits = BSD_INIT_BITS; db->bytes_out = 0; db->in_count = 0; - db->incomp_count = 0; db->ratio = 0; db->checkpoint = CHECK_GAP; }