/*
** 2026 October 13
**
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
******************************************************************************
**
** RISC OS build configuration for SQLite.  Included at the top of the
** amalgamation (c.sqlite3), the RISC OS VFS (c.os_riscos) and the shell
** (c.shell) when RISCOS is defined, so they all agree on the options.
*/
#ifndef _SQLITE_OS_RISCOS_H_
#define _SQLITE_OS_RISCOS_H_

#if defined(RISCOS)
# define OS_RISCOS 1

/* Only the "riscos" VFS in c.os_riscos is built */
# ifndef SQLITE_OS_OTHER
#  define SQLITE_OS_OTHER 1
# endif

/* No threads, no dynamic loading, no mmap, no shared memory (so no WAL) */
# ifndef SQLITE_THREADSAFE
#  define SQLITE_THREADSAFE 0
# endif
# ifndef SQLITE_OMIT_LOAD_EXTENSION
#  define SQLITE_OMIT_LOAD_EXTENSION 1
# endif
# ifndef SQLITE_OMIT_WAL
#  define SQLITE_OMIT_WAL 1
# endif
# ifndef SQLITE_MAX_MMAP_SIZE
#  define SQLITE_MAX_MMAP_SIZE 0
# endif

/*
** FPA doubles (Norcroft -apcs .../fpe2, GCCSDK default) hold the two words
** most significant first, so SQLite must swap them to keep database files
** portable.  Define SQLITE_RISCOS_VFP when building for VFP doubles.
*/
# if !defined(SQLITE_MIXED_ENDIAN_64BIT_FLOAT) && !defined(SQLITE_RISCOS_VFP)
#  if defined(__FLOAT_WORD_ORDER__) && defined(__ORDER_BIG_ENDIAN__)
#   if __FLOAT_WORD_ORDER__ == __ORDER_BIG_ENDIAN__
#    define SQLITE_MIXED_ENDIAN_64BIT_FLOAT 1
#   endif
#  elif !defined(__VFP_FP__)
#   define SQLITE_MIXED_ENDIAN_64BIT_FLOAT 1
#  endif
# endif

/* Temporary files go in <Wimp$ScrapDir> (or <Temp$Dir>) as SQLxxxxxxx */
# define SQLITE_RISCOS_TEMP_PREFIX "SQL"

#else
# define OS_RISCOS 0
#endif

#endif /* _SQLITE_OS_RISCOS_H_ */
