mirror of
https://github.com/holub/mame
synced 2025-05-25 23:35:26 +03:00
Merge branch 'master' of https://github.com/mamedev/mame
This commit is contained in:
commit
23657cbbc8
@ -8494,9 +8494,13 @@ SQLITE_PRIVATE const int sqlite3one;
|
|||||||
/*
|
/*
|
||||||
** Disable MMAP on platforms where it is known to not work
|
** Disable MMAP on platforms where it is known to not work
|
||||||
*/
|
*/
|
||||||
#if defined(__OpenBSD__) || defined(__QNXNTO__)
|
#if defined(__OpenBSD__) || defined(__QNXNTO__) || defined(__OS2__)
|
||||||
# undef SQLITE_MAX_MMAP_SIZE
|
# undef SQLITE_MAX_MMAP_SIZE
|
||||||
# define SQLITE_MAX_MMAP_SIZE 0
|
# define SQLITE_MAX_MMAP_SIZE 0
|
||||||
|
# ifdef __OS2__
|
||||||
|
# undef SQLITE_OMIT_WAL
|
||||||
|
# define SQLITE_OMIT_WAL 0
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -72,6 +72,9 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#ifdef __OS2__
|
||||||
|
#include <sys/time.h> // struct timeval
|
||||||
|
#endif
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
@ -120,7 +123,11 @@ typedef SOCKET sock_t;
|
|||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <sys/select.h>
|
#include <sys/select.h>
|
||||||
#define closesocket(x) close(x)
|
#define closesocket(x) close(x)
|
||||||
|
#ifdef __OS2__
|
||||||
|
typedef int socklen_t;
|
||||||
|
#else
|
||||||
#define __cdecl
|
#define __cdecl
|
||||||
|
#endif
|
||||||
#define INVALID_SOCKET (-1)
|
#define INVALID_SOCKET (-1)
|
||||||
#define to64(x) strtoll(x, NULL, 10)
|
#define to64(x) strtoll(x, NULL, 10)
|
||||||
typedef int sock_t;
|
typedef int sock_t;
|
||||||
@ -1170,7 +1177,9 @@ typedef HANDLE process_id_t;
|
|||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
|
#ifndef __OS2__
|
||||||
#define O_BINARY 0
|
#define O_BINARY 0
|
||||||
|
#endif
|
||||||
#define INT64_FMT PRId64
|
#define INT64_FMT PRId64
|
||||||
typedef struct stat file_stat_t;
|
typedef struct stat file_stat_t;
|
||||||
typedef pid_t process_id_t;
|
typedef pid_t process_id_t;
|
||||||
@ -5152,6 +5161,28 @@ static void *mmap(void *addr, int64_t len, int prot, int flags, int fd,
|
|||||||
#define MAP_FAILED NULL
|
#define MAP_FAILED NULL
|
||||||
#define MAP_PRIVATE 0
|
#define MAP_PRIVATE 0
|
||||||
#define PROT_READ 0
|
#define PROT_READ 0
|
||||||
|
#elif defined(__OS2__)
|
||||||
|
static void *mmap(void *addr, int64_t len, int prot, int flags, int fd,
|
||||||
|
int offset) {
|
||||||
|
void *p;
|
||||||
|
off_t curpos;
|
||||||
|
|
||||||
|
p = malloc(len);
|
||||||
|
if (!p)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
curpos = lseek(fd, 0, SEEK_CUR);
|
||||||
|
lseek(fd, offset, SEEK_SET);
|
||||||
|
read(fd, p, len);
|
||||||
|
lseek(fd, curpos, SEEK_SET);
|
||||||
|
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define munmap(x, y) free(x)
|
||||||
|
#define MAP_FAILED NULL
|
||||||
|
#define MAP_PRIVATE 0
|
||||||
|
#define PROT_READ 0
|
||||||
#else
|
#else
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -590,7 +590,7 @@ WRITE8_MEMBER( px4_state::sior_w )
|
|||||||
// writing clock?
|
// writing clock?
|
||||||
if (m_clock_state > 0)
|
if (m_clock_state > 0)
|
||||||
{
|
{
|
||||||
struct tm *t = localtime(&m_time.time);
|
struct tm *t = localtime((const long int *)&m_time.time);
|
||||||
|
|
||||||
switch (m_clock_state++)
|
switch (m_clock_state++)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user