mirror of
https://git.tukaani.org/xz.git
synced 2024-04-04 12:36:23 +02:00
More pre-C99 inttypes.h compatibility fixes. Now the code
should work even if the system has no inttypes.h.
This commit is contained in:
parent
5d227e51c2
commit
e2417b2b91
5 changed files with 6 additions and 29 deletions
|
@ -14,17 +14,6 @@
|
|||
#ifndef PHYSMEM_H
|
||||
#define PHYSMEM_H
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#ifdef HAVE_LIMITS_H
|
||||
# include <limits.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_PHYSMEM_SYSCTL) || defined(HAVE_NCPU_SYSCTL)
|
||||
# ifdef HAVE_SYS_PARAM_H
|
||||
# include <sys/param.h>
|
||||
|
|
|
@ -13,12 +13,9 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
# include "sysdefs.h"
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
# include "check_byteswap.h"
|
||||
#endif
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/// \file crc32_tablegen.c
|
||||
/// \brief Generates CRC32 crc32_table.c
|
||||
///
|
||||
/// Compiling: gcc -std=c99 -o crc32_tablegen crc32_tablegen.c crc32_init.c
|
||||
/// Compiling: gcc -std=c99 -o crc32_tablegen crc32_tablegen.c
|
||||
/// Add -DWORDS_BIGENDIAN to generate big endian table.
|
||||
//
|
||||
// This code has been put into the public domain.
|
||||
|
@ -18,10 +18,7 @@
|
|||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
extern void lzma_crc32_init(void);
|
||||
|
||||
extern uint32_t lzma_crc32_table[8][256];
|
||||
#include "crc32_init.c"
|
||||
|
||||
|
||||
int
|
||||
|
|
|
@ -13,12 +13,9 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
# include "sysdefs.h"
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
# include "check_byteswap.h"
|
||||
#endif
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/// \file crc64_tablegen.c
|
||||
/// \brief Generates CRC64 crc64_table.c
|
||||
///
|
||||
/// Compiling: gcc -std=c99 -o crc64_tablegen crc64_tablegen.c crc64_init.c
|
||||
/// Compiling: gcc -std=c99 -o crc64_tablegen crc64_tablegen.c
|
||||
/// Add -DWORDS_BIGENDIAN to generate big endian table.
|
||||
//
|
||||
// This code has been put into the public domain.
|
||||
|
@ -18,10 +18,7 @@
|
|||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
extern void lzma_crc64_init(void);
|
||||
|
||||
extern uint64_t lzma_crc64_table[4][256];
|
||||
#include "crc64_init.c"
|
||||
|
||||
|
||||
int
|
||||
|
|
Loading…
Reference in a new issue