mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Changes to extensions and test logic so that the build works with gcc
and with -std=iso9899:1999 FossilOrigin-Name: 2575a68c3965e72f2ab211d933012442755afe6a9b7de9e9e50cdd2155fd1ec8
This commit is contained in:
24
src/hwtime.h
24
src/hwtime.h
@@ -11,7 +11,7 @@
|
||||
******************************************************************************
|
||||
**
|
||||
** This file contains inline asm code for retrieving "high-performance"
|
||||
** counters for x86 class CPUs.
|
||||
** counters for x86 and x86_64 class CPUs.
|
||||
*/
|
||||
#ifndef SQLITE_HWTIME_H
|
||||
#define SQLITE_HWTIME_H
|
||||
@@ -22,8 +22,9 @@
|
||||
** processor and returns that value. This can be used for high-res
|
||||
** profiling.
|
||||
*/
|
||||
#if (defined(__GNUC__) || defined(_MSC_VER)) && \
|
||||
(defined(i386) || defined(__i386__) || defined(_M_IX86))
|
||||
#if !defined(__STRICT_ANSI__) && \
|
||||
(defined(__GNUC__) || defined(_MSC_VER)) && \
|
||||
(defined(i386) || defined(__i386__) || defined(_M_IX86))
|
||||
|
||||
#if defined(__GNUC__)
|
||||
|
||||
@@ -44,7 +45,7 @@
|
||||
|
||||
#endif
|
||||
|
||||
#elif (defined(__GNUC__) && defined(__x86_64__))
|
||||
#elif !defined(__STRICT_ANSI__) && (defined(__GNUC__) && defined(__x86_64__))
|
||||
|
||||
__inline__ sqlite_uint64 sqlite3Hwtime(void){
|
||||
unsigned long val;
|
||||
@@ -52,7 +53,7 @@
|
||||
return val;
|
||||
}
|
||||
|
||||
#elif (defined(__GNUC__) && defined(__ppc__))
|
||||
#elif !defined(__STRICT_ANSI__) && (defined(__GNUC__) && defined(__ppc__))
|
||||
|
||||
__inline__ sqlite_uint64 sqlite3Hwtime(void){
|
||||
unsigned long long retval;
|
||||
@@ -69,14 +70,13 @@
|
||||
|
||||
#else
|
||||
|
||||
#error Need implementation of sqlite3Hwtime() for your platform.
|
||||
|
||||
/*
|
||||
** To compile without implementing sqlite3Hwtime() for your platform,
|
||||
** you can remove the above #error and use the following
|
||||
** stub function. You will lose timing support for many
|
||||
** of the debugging and testing utilities, but it should at
|
||||
** least compile and run.
|
||||
** asm() is needed for hardware timing support. Without asm(),
|
||||
** disable the sqlite3Hwtime() routine.
|
||||
**
|
||||
** sqlite3Hwtime() is only used for some obscure debugging
|
||||
** and analysis configurations, not in any deliverable, so this
|
||||
** should not be a great loss.
|
||||
*/
|
||||
sqlite_uint64 sqlite3Hwtime(void){ return ((sqlite_uint64)0); }
|
||||
|
||||
|
Reference in New Issue
Block a user