"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/lzo_supp.h" between
lzo-2.09.tar.gz and lzo-2.10.tar.gz

About: LZO is a portable lossless data compression library written in ANSI C.

lzo_supp.h  (lzo-2.09):lzo_supp.h  (lzo-2.10)
/* lzo_supp.h -- architecture, OS and compiler specific defines /* lzo_supp.h -- architecture, OS and compiler specific defines
This file is part of the LZO real-time data compression library. This file is part of the LZO real-time data compression library.
Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved. All Rights Reserved.
The LZO library is free software; you can redistribute it and/or The LZO library is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version. the License, or (at your option) any later version.
The LZO library is distributed in the hope that it will be useful, The LZO library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
skipping to change at line 73 skipping to change at line 73
#define HAVE_STRING_H 1 #define HAVE_STRING_H 1
#define HAVE_TIME_H 1 #define HAVE_TIME_H 1
#define HAVE_UNISTD_H 1 #define HAVE_UNISTD_H 1
#define HAVE_UTIME_H 1 #define HAVE_UTIME_H 1
#define HAVE_SYS_STAT_H 1 #define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TIME_H 1 #define HAVE_SYS_TIME_H 1
#define HAVE_SYS_TYPES_H 1 #define HAVE_SYS_TYPES_H 1
#if (LZO_OS_POSIX) #if (LZO_OS_POSIX)
# if (LZO_OS_POSIX_AIX) # if (LZO_OS_POSIX_AIX)
# define HAVE_SYS_RESOURCE_H 1 # define HAVE_SYS_RESOURCE_H 1
# elif (LZO_OS_POSIX_FREEBSD || LZO_OS_POSIX_MACOSX || LZO_OS_POSIX_NETBSD || L ZO_OS_POSIX_OPENBSD) # elif (LZO_OS_POSIX_DARWIN || LZO_OS_POSIX_FREEBSD || LZO_OS_POSIX_NETBSD || L ZO_OS_POSIX_OPENBSD)
# define HAVE_STRINGS_H 1 # define HAVE_STRINGS_H 1
# undef HAVE_MALLOC_H # undef HAVE_MALLOC_H
# elif (LZO_OS_POSIX_HPUX || LZO_OS_POSIX_INTERIX) # elif (LZO_OS_POSIX_HPUX || LZO_OS_POSIX_INTERIX)
# define HAVE_ALLOCA_H 1 # define HAVE_ALLOCA_H 1
# elif (LZO_OS_POSIX_MACOSX && LZO_LIBC_MSL) # elif (LZO_OS_POSIX_DARWIN && LZO_LIBC_MSL)
# undef HAVE_SYS_TIME_H # undef HAVE_SYS_TIME_H
# undef HAVE_SYS_TYPES_H # undef HAVE_SYS_TYPES_H
# elif (LZO_OS_POSIX_SOLARIS || LZO_OS_POSIX_SUNOS) # elif (LZO_OS_POSIX_SOLARIS || LZO_OS_POSIX_SUNOS)
# define HAVE_ALLOCA_H 1 # define HAVE_ALLOCA_H 1
# endif # endif
# if (LZO_LIBC_DIETLIBC || LZO_LIBC_GLIBC || LZO_LIBC_UCLIBC) # if (LZO_LIBC_DIETLIBC || LZO_LIBC_GLIBC || LZO_LIBC_UCLIBC)
# define HAVE_STRINGS_H 1 # define HAVE_STRINGS_H 1
# define HAVE_SYS_MMAN_H 1 # define HAVE_SYS_MMAN_H 1
# define HAVE_SYS_RESOURCE_H 1 # define HAVE_SYS_RESOURCE_H 1
# define HAVE_SYS_WAIT_H 1 # define HAVE_SYS_WAIT_H 1
skipping to change at line 156 skipping to change at line 156
# define HAVE_ALLOCA_H 1 # define HAVE_ALLOCA_H 1
# undef HAVE_DIRENT_H # undef HAVE_DIRENT_H
# undef HAVE_UNISTD_H # undef HAVE_UNISTD_H
#elif (LZO_CC_IBMC && LZO_OS_OS2) #elif (LZO_CC_IBMC && LZO_OS_OS2)
# undef HAVE_DOS_H # undef HAVE_DOS_H
# undef HAVE_DIRENT_H # undef HAVE_DIRENT_H
# undef HAVE_UNISTD_H # undef HAVE_UNISTD_H
# undef HAVE_UTIME_H # undef HAVE_UTIME_H
# undef HAVE_SYS_TIME_H # undef HAVE_SYS_TIME_H
# define HAVE_SYS_UTIME_H 1 # define HAVE_SYS_UTIME_H 1
#elif (LZO_CC_GHS || LZO_CC_INTELC || LZO_CC_MSC) #elif (LZO_CC_CLANG_C2 || LZO_CC_CLANG_MSC || LZO_CC_GHS || LZO_CC_INTELC_MSC || LZO_CC_MSC)
# undef HAVE_DIRENT_H # undef HAVE_DIRENT_H
# undef HAVE_UNISTD_H # undef HAVE_UNISTD_H
# undef HAVE_UTIME_H # undef HAVE_UTIME_H
# undef HAVE_SYS_TIME_H # undef HAVE_SYS_TIME_H
# define HAVE_SYS_UTIME_H 1 # define HAVE_SYS_UTIME_H 1
#elif (LZO_CC_LCCWIN32) #elif (LZO_CC_LCCWIN32)
# undef HAVE_DIRENT_H # undef HAVE_DIRENT_H
# undef HAVE_DOS_H # undef HAVE_DOS_H
# undef HAVE_UNISTD_H # undef HAVE_UNISTD_H
# undef HAVE_SYS_TIME_H # undef HAVE_SYS_TIME_H
skipping to change at line 354 skipping to change at line 354
#elif (LZO_OS_WIN32 && LZO_CC_GNUC) && defined(__PW32__) #elif (LZO_OS_WIN32 && LZO_CC_GNUC) && defined(__PW32__)
# define HAVE_STRCASECMP 1 # define HAVE_STRCASECMP 1
# define HAVE_STRNCASECMP 1 # define HAVE_STRNCASECMP 1
#else #else
# define HAVE_STRICMP 1 # define HAVE_STRICMP 1
# define HAVE_STRNICMP 1 # define HAVE_STRNICMP 1
#endif #endif
#if (LZO_OS_POSIX) #if (LZO_OS_POSIX)
# if (LZO_OS_POSIX_AIX) # if (LZO_OS_POSIX_AIX)
# define HAVE_GETRUSAGE 1 # define HAVE_GETRUSAGE 1
# elif (LZO_OS_POSIX_MACOSX && LZO_LIBC_MSL) # elif (LZO_OS_POSIX_DARWIN && LZO_LIBC_MSL)
# undef HAVE_CHOWN # undef HAVE_CHOWN
# undef HAVE_LSTAT # undef HAVE_LSTAT
# elif (LZO_OS_POSIX_UNICOS) # elif (LZO_OS_POSIX_UNICOS)
# undef HAVE_ALLOCA # undef HAVE_ALLOCA
# undef HAVE_SNPRINTF # undef HAVE_SNPRINTF
# undef HAVE_VSNPRINTF # undef HAVE_VSNPRINTF
# endif # endif
# if (LZO_CC_TINYC) # if (LZO_CC_TINYC)
# undef HAVE_ALLOCA # undef HAVE_ALLOCA
# endif # endif
skipping to change at line 450 skipping to change at line 450
# undef HAVE_ALLOCA # undef HAVE_ALLOCA
# ifndef snprintf # ifndef snprintf
# define snprintf _snprintf # define snprintf _snprintf
# endif # endif
# ifndef vsnprintf # ifndef vsnprintf
# define vsnprintf _vsnprintf # define vsnprintf _vsnprintf
# endif # endif
#elif (LZO_CC_IBMC) #elif (LZO_CC_IBMC)
# undef HAVE_SNPRINTF # undef HAVE_SNPRINTF
# undef HAVE_VSNPRINTF # undef HAVE_VSNPRINTF
#elif (LZO_CC_INTELC) #elif (LZO_CC_CLANG_MSC || LZO_CC_INTELC_MSC)
# ifndef snprintf # ifndef snprintf
# define snprintf _snprintf # define snprintf _snprintf
# endif # endif
# ifndef vsnprintf # ifndef vsnprintf
# define vsnprintf _vsnprintf # define vsnprintf _vsnprintf
# endif # endif
#elif (LZO_CC_LCCWIN32) #elif (LZO_CC_LCCWIN32)
# define utime _utime # define utime _utime
#elif (LZO_CC_MSC) #elif (LZO_CC_CLANG_C2 || LZO_CC_MSC)
# if (_MSC_VER < 600) # if (_MSC_VER < 600)
# undef HAVE_STRFTIME # undef HAVE_STRFTIME
# endif # endif
# if (_MSC_VER < 700) # if (_MSC_VER < 700)
# undef HAVE_SNPRINTF # undef HAVE_SNPRINTF
# undef HAVE_VSNPRINTF # undef HAVE_VSNPRINTF
# elif (_MSC_VER < 1500) # elif (_MSC_VER < 1500)
# ifndef snprintf # ifndef snprintf
# define snprintf _snprintf # define snprintf _snprintf
# endif # endif
# ifndef vsnprintf # ifndef vsnprintf
# define vsnprintf _vsnprintf # define vsnprintf _vsnprintf
# endif # endif
# else # elif (_MSC_VER < 1900)
# ifndef snprintf # ifndef snprintf
# define snprintf _snprintf # define snprintf _snprintf
# endif # endif
# endif # endif
# if ((_MSC_VER < 800) && LZO_OS_WIN16) # if ((_MSC_VER < 800) && LZO_OS_WIN16)
# undef HAVE_ALLOCA # undef HAVE_ALLOCA
# endif # endif
# if (LZO_ARCH_I086) && defined(__cplusplus) # if (LZO_ARCH_I086) && defined(__cplusplus)
# undef HAVE_LONGJMP # undef HAVE_LONGJMP
# undef HAVE_SETJMP # undef HAVE_SETJMP
skipping to change at line 658 skipping to change at line 658
# define lzo_signo_t lzo_int32e_t # define lzo_signo_t lzo_int32e_t
#endif #endif
#if !defined(lzo_signo_t) #if !defined(lzo_signo_t)
# define lzo_signo_t int # define lzo_signo_t int
#endif #endif
#if defined(__cplusplus) #if defined(__cplusplus)
extern "C" { extern "C" {
#endif #endif
#if (LZO_BROKEN_CDECL_ALT_SYNTAX) #if (LZO_BROKEN_CDECL_ALT_SYNTAX)
typedef void __lzo_cdecl_sighandler (*lzo_sighandler_t)(lzo_signo_t); typedef void __lzo_cdecl_sighandler (*lzo_sighandler_t)(lzo_signo_t);
#elif defined(RETSIGTYPE)
typedef RETSIGTYPE (__lzo_cdecl_sighandler *lzo_sighandler_t)(lzo_signo_t);
#else #else
typedef void (__lzo_cdecl_sighandler *lzo_sighandler_t)(lzo_signo_t); typedef void (__lzo_cdecl_sighandler *lzo_sighandler_t)(lzo_signo_t);
#endif #endif
#if defined(__cplusplus) #if defined(__cplusplus)
} }
#endif #endif
#endif #endif
#endif #endif
#if defined(LZO_WANT_ACC_INCD_H) #if defined(LZO_WANT_ACC_INCD_H)
# undef LZO_WANT_ACC_INCD_H # undef LZO_WANT_ACC_INCD_H
skipping to change at line 814 skipping to change at line 812
#endif #endif
#if (HAVE_DIRENT_H) #if (HAVE_DIRENT_H)
# include <dirent.h> # include <dirent.h>
#endif #endif
#if (HAVE_SETJMP_H) #if (HAVE_SETJMP_H)
# include <setjmp.h> # include <setjmp.h>
#endif #endif
#if (HAVE_SIGNAL_H) #if (HAVE_SIGNAL_H)
# include <signal.h> # include <signal.h>
#endif #endif
#if (TIME_WITH_SYS_TIME) #if (HAVE_SYS_TIME_H && HAVE_TIME_H)
# include <sys/time.h> # include <sys/time.h>
# include <time.h> # include <time.h>
#elif (HAVE_TIME_H) #elif (HAVE_TIME_H)
# include <time.h> # include <time.h>
#endif #endif
#if (HAVE_UTIME_H) #if (HAVE_UTIME_H)
# include <utime.h> # include <utime.h>
#elif (HAVE_SYS_UTIME_H) #elif (HAVE_SYS_UTIME_H)
# include <sys/utime.h> # include <sys/utime.h>
#endif #endif
skipping to change at line 1515 skipping to change at line 1513
LZOCHK_ASSERT((_MIPS_SZINT) == 8 * sizeof(int)) LZOCHK_ASSERT((_MIPS_SZINT) == 8 * sizeof(int))
# endif # endif
# if (LZO_ARCH_MIPS) && defined(_MIPS_SZLONG) # if (LZO_ARCH_MIPS) && defined(_MIPS_SZLONG)
LZOCHK_ASSERT((_MIPS_SZLONG) == 8 * sizeof(long)) LZOCHK_ASSERT((_MIPS_SZLONG) == 8 * sizeof(long))
# endif # endif
# if (LZO_ARCH_MIPS) && defined(_MIPS_SZPTR) # if (LZO_ARCH_MIPS) && defined(_MIPS_SZPTR)
LZOCHK_ASSERT((_MIPS_SZPTR) == 8 * sizeof(void *)) LZOCHK_ASSERT((_MIPS_SZPTR) == 8 * sizeof(void *))
# endif # endif
#endif #endif
LZOCHK_ASSERT(1 == 1) LZOCHK_ASSERT(1 == 1)
LZOCHK_ASSERT(__LZO_MASK_GEN(1u,1) == 1) LZOCHK_ASSERT(__LZO_MASK_GEN(1u,1) == 1u)
LZOCHK_ASSERT(__LZO_MASK_GEN(1u,2) == 3) LZOCHK_ASSERT(__LZO_MASK_GEN(1u,2) == 3u)
LZOCHK_ASSERT(__LZO_MASK_GEN(1u,3) == 7) LZOCHK_ASSERT(__LZO_MASK_GEN(1u,3) == 7u)
LZOCHK_ASSERT(__LZO_MASK_GEN(1u,8) == 255) LZOCHK_ASSERT(__LZO_MASK_GEN(1u,8) == 255u)
#if (LZO_SIZEOF_INT >= 2) #if (LZO_SIZEOF_INT >= 2)
LZOCHK_ASSERT(__LZO_MASK_GEN(1,15) == 32767) LZOCHK_ASSERT(__LZO_MASK_GEN(1,15) == 32767)
LZOCHK_ASSERT(__LZO_MASK_GEN(1u,16) == 0xffffU) LZOCHK_ASSERT(__LZO_MASK_GEN(1u,16) == 0xffffU)
LZOCHK_ASSERT(__LZO_MASK_GEN(0u,16) == 0u) LZOCHK_ASSERT(__LZO_MASK_GEN(0u,16) == 0u)
#else #endif
LZOCHK_ASSERT(__LZO_MASK_GEN(1ul,16) == 0xffffUL) LZOCHK_ASSERT(__LZO_MASK_GEN(1ul,16) == 0xffffUL)
LZOCHK_ASSERT(__LZO_MASK_GEN(0ul,16) == 0ul) LZOCHK_ASSERT(__LZO_MASK_GEN(0ul,16) == 0ul)
#endif
#if (LZO_SIZEOF_INT >= 4) #if (LZO_SIZEOF_INT >= 4)
LZOCHK_ASSERT(__LZO_MASK_GEN(1,31) == 2147483647) LZOCHK_ASSERT(__LZO_MASK_GEN(1,31) == 2147483647)
LZOCHK_ASSERT(__LZO_MASK_GEN(1u,32) == 0xffffffffU) LZOCHK_ASSERT(__LZO_MASK_GEN(1u,32) == 0xffffffffU)
LZOCHK_ASSERT(__LZO_MASK_GEN(0u,32) == 0u) LZOCHK_ASSERT(__LZO_MASK_GEN(0u,32) == 0u)
#endif #endif
#if (LZO_SIZEOF_LONG >= 4) #if (LZO_SIZEOF_LONG >= 4)
LZOCHK_ASSERT(__LZO_MASK_GEN(1ul,32) == 0xffffffffUL) LZOCHK_ASSERT(__LZO_MASK_GEN(1ul,32) == 0xffffffffUL)
LZOCHK_ASSERT(__LZO_MASK_GEN(0ul,32) == 0ul) LZOCHK_ASSERT(__LZO_MASK_GEN(0ul,32) == 0ul)
#endif #endif
#if (LZO_SIZEOF_LONG >= 8) #if (LZO_SIZEOF_LONG >= 8)
skipping to change at line 1924 skipping to change at line 1921
LZOCHK_ASSERT(sizeof(lzo_intptr_t) == sizeof(void *)) LZOCHK_ASSERT(sizeof(lzo_intptr_t) == sizeof(void *))
#endif #endif
#if (LZO_ABI_LP64) #if (LZO_ABI_LP64)
LZOCHK_ASSERT(sizeof(int) == 4) LZOCHK_ASSERT(sizeof(int) == 4)
LZOCHK_ASSERT(sizeof(long) == 8) LZOCHK_ASSERT(sizeof(long) == 8)
LZOCHK_ASSERT(sizeof(void*) == 8) LZOCHK_ASSERT(sizeof(void*) == 8)
LZOCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(void*)) LZOCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(void*))
LZOCHK_ASSERT(sizeof(size_t) == sizeof(void*)) LZOCHK_ASSERT(sizeof(size_t) == sizeof(void*))
LZOCHK_ASSERT(sizeof(lzo_intptr_t) == sizeof(void *)) LZOCHK_ASSERT(sizeof(lzo_intptr_t) == sizeof(void *))
#endif #endif
#if (LZO_ABI_IP32W64)
LZOCHK_ASSERT(sizeof(int) == 4)
LZOCHK_ASSERT(sizeof(void*) == 4)
LZOCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(void*))
LZOCHK_ASSERT(sizeof(size_t) == sizeof(void*))
LZOCHK_ASSERT(sizeof(lzo_intptr_t) == sizeof(void *))
LZOCHK_ASSERT(LZO_WORDSIZE == 8)
#endif
#if (LZO_ARCH_I086) #if (LZO_ARCH_I086)
LZOCHK_ASSERT(sizeof(size_t) == 2) LZOCHK_ASSERT(sizeof(size_t) == 2)
LZOCHK_ASSERT(sizeof(lzo_intptr_t) == sizeof(void *)) LZOCHK_ASSERT(sizeof(lzo_intptr_t) == sizeof(void *))
#elif (LZO_ARCH_I386 || LZO_ARCH_M68K) #elif (LZO_ARCH_I386 || LZO_ARCH_M68K)
LZOCHK_ASSERT(sizeof(size_t) == 4) LZOCHK_ASSERT(sizeof(size_t) == 4)
LZOCHK_ASSERT(sizeof(ptrdiff_t) == 4) LZOCHK_ASSERT(sizeof(ptrdiff_t) == 4)
LZOCHK_ASSERT(sizeof(lzo_intptr_t) == sizeof(void *)) LZOCHK_ASSERT(sizeof(lzo_intptr_t) == sizeof(void *))
#endif #endif
#if (LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_WIN32) #if (LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_WIN32)
LZOCHK_ASSERT(sizeof(size_t) == 4) LZOCHK_ASSERT(sizeof(size_t) == 4)
skipping to change at line 2539 skipping to change at line 2544
unsigned char c; unsigned char c;
const char* s; const char* s;
lzo_label_next_shortopt: lzo_label_next_shortopt:
a = g->argv[g->optind] + ++g->shortpos; a = g->argv[g->optind] + ++g->shortpos;
c = (unsigned char) *a++; s = NULL; c = (unsigned char) *a++; s = NULL;
if (c != ':' && shortopts) if (c != ':' && shortopts)
s = strchr(shortopts, c); s = strchr(shortopts, c);
if (!s || s[1] != ':') if (!s || s[1] != ':')
{ {
if (!a[0]) if (!a[0])
++g->optind, g->shortpos = 0; { ++g->optind; g->shortpos = 0; }
if (!s) if (!s)
{ {
g->optopt = c; g->optopt = c;
return pe(g, g->bad_option, "invalid option '-%c'", c); return pe(g, g->bad_option, "invalid option '-%c'", c);
} }
} }
else else
{ {
++g->optind, g->shortpos = 0; ++g->optind; g->shortpos = 0;
if (a[0]) if (a[0])
g->optarg = a; g->optarg = a;
else if (s[2] != ':') else if (s[2] != ':')
{ {
if (g->optind < g->argc) if (g->optind < g->argc)
g->optarg = g->argv[g->optind++]; g->optarg = g->argv[g->optind++];
else else
{ {
g->optopt = c; g->optopt = c;
return pe(g, missing_arg_ret, "option '-%c' requires an argu ment", c); return pe(g, missing_arg_ret, "option '-%c' requires an argu ment", c);
skipping to change at line 2658 skipping to change at line 2663
#elif (LZO_CC_MSC || LZO_CC_WATCOMC) #elif (LZO_CC_MSC || LZO_CC_WATCOMC)
p = halloc(size, 1); p = halloc(size, 1);
#elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) #elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC)
p = farmalloc(size); p = farmalloc(size);
#elif (LZO_CC_BORLANDC || LZO_CC_TURBOC) #elif (LZO_CC_BORLANDC || LZO_CC_TURBOC)
p = farmalloc(size); p = farmalloc(size);
#elif (LZO_CC_AZTECC) #elif (LZO_CC_AZTECC)
p = lmalloc(size); p = lmalloc(size);
#else #else
if (size < LZO_STATIC_CAST(size_t, -1)) if (size < LZO_STATIC_CAST(size_t, -1))
p = malloc((size_t) size); p = malloc(LZO_STATIC_CAST(size_t, size));
#endif #endif
} }
#endif #endif
return p; return p;
} }
LZOLIB_PUBLIC(void, lzo_hfree) (lzo_hvoid_p p) LZOLIB_PUBLIC(void, lzo_hfree) (lzo_hvoid_p p)
{ {
if (!p) if (!p)
return; return;
#if 0 && defined(__palmos__) #if 0 && defined(__palmos__)
skipping to change at line 2868 skipping to change at line 2873
errno = saved_errno; errno = saved_errno;
return l; return l;
} }
#endif #endif
#if defined(LZO_WANT_ACCLIB_PCLOCK) #if defined(LZO_WANT_ACCLIB_PCLOCK)
# undef LZO_WANT_ACCLIB_PCLOCK # undef LZO_WANT_ACCLIB_PCLOCK
#define __LZOLIB_PCLOCK_CH_INCLUDED 1 #define __LZOLIB_PCLOCK_CH_INCLUDED 1
#if !defined(LZOLIB_PUBLIC) #if !defined(LZOLIB_PUBLIC)
# define LZOLIB_PUBLIC(r,f) r __LZOLIB_FUNCNAME(f) # define LZOLIB_PUBLIC(r,f) r __LZOLIB_FUNCNAME(f)
#endif #endif
#if 1 && (LZO_OS_POSIX_LINUX && LZO_ARCH_AMD64 && LZO_ASM_SYNTAX_GNUC) #if 1 && (LZO_OS_POSIX_LINUX && LZO_ARCH_AMD64 && LZO_ASM_SYNTAX_GNUC && !LZO_CF G_NO_SYSCALL)
#ifndef lzo_pclock_syscall_clock_gettime #ifndef lzo_pclock_syscall_clock_gettime
#define lzo_pclock_syscall_clock_gettime lzo_pclock_syscall_clock_gettime #define lzo_pclock_syscall_clock_gettime lzo_pclock_syscall_clock_gettime
#endif #endif
__lzo_static_noinline long lzo_pclock_syscall_clock_gettime(long clockid, struct timespec *ts) __lzo_static_noinline long lzo_pclock_syscall_clock_gettime(long clockid, struct timespec *ts)
{ {
unsigned long r = 228; unsigned long r = 228;
__asm__ __volatile__("syscall\n" : "=a" (r) : "0" (r), "D" (clockid), "S" (t s) __LZO_ASM_CLOBBER_LIST_CC_MEMORY); __asm__ __volatile__("syscall\n" : "=a" (r), "=m" (*ts) : "0" (r), "D" (cloc kid), "S" (ts) __LZO_ASM_CLOBBER_LIST_CC);
return LZO_ICAST(long, r); return LZO_ICAST(long, r);
} }
#endif #endif
#if 1 && (LZO_OS_POSIX_LINUX && LZO_ARCH_I386 && LZO_ASM_SYNTAX_GNUC) && defined (lzo_int64l_t) #if 1 && (LZO_OS_POSIX_LINUX && LZO_ARCH_I386 && LZO_ASM_SYNTAX_GNUC && !LZO_CFG _NO_SYSCALL) && defined(lzo_int64l_t)
#ifndef lzo_pclock_syscall_clock_gettime #ifndef lzo_pclock_syscall_clock_gettime
#define lzo_pclock_syscall_clock_gettime lzo_pclock_syscall_clock_gettime #define lzo_pclock_syscall_clock_gettime lzo_pclock_syscall_clock_gettime
#endif #endif
__lzo_static_noinline long lzo_pclock_syscall_clock_gettime(long clockid, struct timespec *ts) __lzo_static_noinline long lzo_pclock_syscall_clock_gettime(long clockid, struct timespec *ts)
{ {
unsigned long r = 265; unsigned long r = 265;
__asm__ __volatile__("pushl %%ebx\n pushl %%edx\n popl %%ebx\n int $0x80\n p opl %%ebx\n" : "=a" (r) : "0" (r), "d" (clockid), "c" (ts) __LZO_ASM_CLOBBER_LIS T_CC_MEMORY); __asm__ __volatile__("pushl %%ebx\n pushl %%edx\n popl %%ebx\n int $0x80\n p opl %%ebx\n": "=a" (r), "=m" (*ts) : "0" (r), "d" (clockid), "c" (ts) __LZO_ASM_ CLOBBER_LIST_CC);
return LZO_ICAST(long, r); return LZO_ICAST(long, r);
} }
#endif #endif
#if 0 && defined(lzo_pclock_syscall_clock_gettime) #if 0 && defined(lzo_pclock_syscall_clock_gettime)
#ifndef lzo_pclock_read_clock_gettime_r_syscall #ifndef lzo_pclock_read_clock_gettime_r_syscall
#define lzo_pclock_read_clock_gettime_r_syscall lzo_pclock_read_clock_gettime_r_ syscall #define lzo_pclock_read_clock_gettime_r_syscall lzo_pclock_read_clock_gettime_r_ syscall
#endif #endif
static int lzo_pclock_read_clock_gettime_r_syscall(lzo_pclock_handle_p h, lzo_pc lock_p c) static int lzo_pclock_read_clock_gettime_r_syscall(lzo_pclock_handle_p h, lzo_pc lock_p c)
{ {
struct timespec ts; struct timespec ts;
skipping to change at line 3285 skipping to change at line 3290
#endif #endif
return tstop - tstart; return tstop - tstart;
} }
} }
#endif #endif
LZOLIB_PUBLIC(int, lzo_pclock_flush_cpu_cache) (lzo_pclock_handle_p h, unsigned flags) LZOLIB_PUBLIC(int, lzo_pclock_flush_cpu_cache) (lzo_pclock_handle_p h, unsigned flags)
{ {
LZO_UNUSED(h); LZO_UNUSED(flags); LZO_UNUSED(h); LZO_UNUSED(flags);
return -1; return -1;
} }
#if defined(__LZOLIB_PCLOCK_NEED_WARN_POP)
# if (LZO_CC_MSC && (_MSC_VER >= 1200))
# pragma warning(pop)
# else
# error "__LZOLIB_PCLOCK_NEED_WARN_POP"
# endif
# undef __LZOLIB_PCLOCK_NEED_WARN_POP
#endif
#endif #endif
#if defined(LZO_WANT_ACCLIB_MISC) #if defined(LZO_WANT_ACCLIB_MISC)
# undef LZO_WANT_ACCLIB_MISC # undef LZO_WANT_ACCLIB_MISC
#define __LZOLIB_MISC_CH_INCLUDED 1 #define __LZOLIB_MISC_CH_INCLUDED 1
#if !defined(LZOLIB_PUBLIC) #if !defined(LZOLIB_PUBLIC)
# define LZOLIB_PUBLIC(r,f) r __LZOLIB_FUNCNAME(f) # define LZOLIB_PUBLIC(r,f) r __LZOLIB_FUNCNAME(f)
#endif #endif
#if !defined(LZOLIB_PUBLIC_NOINLINE) #if !defined(LZOLIB_PUBLIC_NOINLINE)
# if !defined(__lzo_noinline) # if !defined(__lzo_noinline)
# define LZOLIB_PUBLIC_NOINLINE(r,f) r __LZOLIB_FUNCNAME(f) # define LZOLIB_PUBLIC_NOINLINE(r,f) r __LZOLIB_FUNCNAME(f)
skipping to change at line 3512 skipping to change at line 3509
#if defined(lzo_int64l_t) #if defined(lzo_int64l_t)
lzo_uint64l_t rr = (LZO_ICONV(lzo_uint64l_t, a) * b) / x; lzo_uint64l_t rr = (LZO_ICONV(lzo_uint64l_t, a) * b) / x;
r = LZO_ITRUNC(lzo_uint32e_t, rr); r = LZO_ITRUNC(lzo_uint32e_t, rr);
#else #else
LZO_UNUSED(a); LZO_UNUSED(b); LZO_UNUSED(a); LZO_UNUSED(b);
#endif #endif
} }
return r; return r;
} }
#endif #endif
#if 0
LZOLIB_PUBLIC_NOINLINE(int, lzo_syscall_clock_gettime) (int c)
{
}
#endif
#if (LZO_OS_WIN16) #if (LZO_OS_WIN16)
LZO_EXTERN_C void __far __pascal DebugBreak(void); LZO_EXTERN_C void __far __pascal DebugBreak(void);
#endif #endif
LZOLIB_PUBLIC_NOINLINE(void, lzo_debug_break) (void) LZOLIB_PUBLIC_NOINLINE(void, lzo_debug_break) (void)
{ {
#if (LZO_OS_WIN16) #if (LZO_OS_WIN16)
DebugBreak(); DebugBreak();
#elif (LZO_ARCH_I086) #elif (LZO_ARCH_I086)
#elif (LZO_OS_WIN64) && (LZO_HAVE_WINDOWS_H) #elif (LZO_OS_WIN64) && (LZO_HAVE_WINDOWS_H)
DebugBreak(); DebugBreak();
skipping to change at line 3644 skipping to change at line 3636
# define LZOLIB_PUBLIC(r,f) r __LZOLIB_FUNCNAME(f) # define LZOLIB_PUBLIC(r,f) r __LZOLIB_FUNCNAME(f)
#endif #endif
#if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) #if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16)
#if 0 && (LZO_CC_MSC) #if 0 && (LZO_CC_MSC)
LZO_EXTERN_C int __lzo_cdecl __setargv(void); LZO_EXTERN_C int __lzo_cdecl __setargv(void);
LZO_EXTERN_C int __lzo_cdecl _setargv(void); LZO_EXTERN_C int __lzo_cdecl _setargv(void);
LZO_EXTERN_C int __lzo_cdecl _setargv(void) { return __setargv(); } LZO_EXTERN_C int __lzo_cdecl _setargv(void) { return __setargv(); }
#endif #endif
#endif #endif
#if (LZO_OS_WIN32 || LZO_OS_WIN64) #if (LZO_OS_WIN32 || LZO_OS_WIN64)
#if (LZO_CC_INTELC || LZO_CC_MSC) #if (LZO_CC_MSC && (_MSC_VER >= 1900))
#elif (LZO_CC_INTELC || LZO_CC_MSC)
LZO_EXTERN_C int __lzo_cdecl __setargv(void); LZO_EXTERN_C int __lzo_cdecl __setargv(void);
LZO_EXTERN_C int __lzo_cdecl _setargv(void); LZO_EXTERN_C int __lzo_cdecl _setargv(void);
LZO_EXTERN_C int __lzo_cdecl _setargv(void) { return __setargv(); } LZO_EXTERN_C int __lzo_cdecl _setargv(void) { return __setargv(); }
#endif #endif
#endif #endif
#if (LZO_OS_EMX) #if (LZO_OS_EMX)
#define __LZOLIB_HAVE_LZO_WILDARGV 1 #define __LZOLIB_HAVE_LZO_WILDARGV 1
LZOLIB_PUBLIC(void, lzo_wildargv) (int* argc, char*** argv) LZOLIB_PUBLIC(void, lzo_wildargv) (int* argc, char*** argv)
{ {
if (argc && argv) { if (argc && argv) {
 End of changes. 24 change blocks. 
38 lines changed or deleted 31 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS