summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd')
-rw-r--r--src/osd/modules/lib/osdlib_os2.c5
-rw-r--r--src/osd/modules/sync/sync_os2.c12
-rw-r--r--src/osd/sdl/sdl.mak1
-rw-r--r--src/osd/sdl/sdlfile.c4
-rw-r--r--src/osd/sdl/sdlos_os2.c66
5 files changed, 7 insertions, 81 deletions
diff --git a/src/osd/modules/lib/osdlib_os2.c b/src/osd/modules/lib/osdlib_os2.c
index 9e1ab8fd52d..93f1ca97f44 100644
--- a/src/osd/modules/lib/osdlib_os2.c
+++ b/src/osd/modules/lib/osdlib_os2.c
@@ -49,7 +49,10 @@ int osd_setenv(const char *name, const char *value, int overwrite)
void osd_process_kill(void)
{
- fprintf(stderr,"osd_process_kill missing in OS/2 build\n");
+ PPIB ppib;
+
+ DosGetInfoBlocks(NULL, &ppib);
+ DosKillProcess(DKP_PROCESSTREE, ppib->pib_ulpid);
}
//============================================================
diff --git a/src/osd/modules/sync/sync_os2.c b/src/osd/modules/sync/sync_os2.c
index 9c0612c1288..5526b26cf3b 100644
--- a/src/osd/modules/sync/sync_os2.c
+++ b/src/osd/modules/sync/sync_os2.c
@@ -479,15 +479,3 @@ void osd_thread_wait_free(osd_thread *thread)
DosWaitThread(&tid, 0);
free(thread);
}
-
-//============================================================
-// osd_process_kill
-//============================================================
-
-void osd_process_kill(void)
-{
- PPIB ppib;
-
- DosGetInfoBlocks(NULL, &ppib);
- DosKillProcess(DKP_PROCESSTREE, ppib->pib_ulpid);
-}
diff --git a/src/osd/sdl/sdl.mak b/src/osd/sdl/sdl.mak
index 479abdd6624..5fe16406090 100644
--- a/src/osd/sdl/sdl.mak
+++ b/src/osd/sdl/sdl.mak
@@ -752,6 +752,7 @@ SDLLIBS := $(shell sdl-config --libs)
INCPATH += $(SDLCFLAGS)
LIBS += $(SDLLIBS) -lpthread
+BASELIBS += += $(SDLLIBS) -lpthread
endif # OS2
diff --git a/src/osd/sdl/sdlfile.c b/src/osd/sdl/sdlfile.c
index 5dc2b309cc9..a010c02776a 100644
--- a/src/osd/sdl/sdlfile.c
+++ b/src/osd/sdl/sdlfile.c
@@ -507,13 +507,13 @@ osd_directory_entry *osd_stat(const char *path)
{
int err;
osd_directory_entry *result = NULL;
- #if defined(SDLMAME_NO64BITIO) || defined(SDLMAME_BSD) || defined(SDLMAME_DARWIN)
+ #if defined(SDLMAME_NO64BITIO) || defined(SDLMAME_BSD) || defined(SDLMAME_DARWIN) || defined(SDLMAME_OS2)
struct stat st;
#else
struct stat64 st;
#endif
- #if defined(SDLMAME_NO64BITIO) || defined(SDLMAME_BSD) || defined(SDLMAME_DARWIN)
+ #if defined(SDLMAME_NO64BITIO) || defined(SDLMAME_BSD) || defined(SDLMAME_DARWIN) || defined(SDLMAME_OS2)
err = stat(path, &st);
#else
err = stat64(path, &st);
diff --git a/src/osd/sdl/sdlos_os2.c b/src/osd/sdl/sdlos_os2.c
index 2137bace1b4..4aa5450bcb7 100644
--- a/src/osd/sdl/sdlos_os2.c
+++ b/src/osd/sdl/sdlos_os2.c
@@ -23,7 +23,6 @@
// MAME headers
#include "osdcore.h"
-#include "osdlib.h"
//============================================================
// osd_get_clipboard_text
@@ -36,68 +35,3 @@ char *osd_get_clipboard_text(void)
return result;
}
-
-//============================================================
-// osd_stat
-//============================================================
-
-osd_directory_entry *osd_stat(const char *path)
-{
- int err;
- osd_directory_entry *result = NULL;
- struct stat st;
-
- err = stat(path, &st);
-
- if( err == -1) return NULL;
-
- // create an osd_directory_entry; be sure to make sure that the caller can
- // free all resources by just freeing the resulting osd_directory_entry
- result = (osd_directory_entry *) osd_malloc_array(sizeof(*result) + strlen(path) + 1);
- strcpy(((char *) result) + sizeof(*result), path);
- result->name = ((char *) result) + sizeof(*result);
- result->type = S_ISDIR(st.st_mode) ? ENTTYPE_DIR : ENTTYPE_FILE;
- result->size = (UINT64)st.st_size;
-
- return result;
-}
-
-//============================================================
-// osd_get_volume_name
-//============================================================
-
-const char *osd_get_volume_name(int idx)
-{
- static char szDrive[] = "A:\\";
-
- ULONG ulCurDisk;
- ULONG ulDriveMap;
-
- DosQueryCurrentDisk(&ulCurDisk, &ulDriveMap);
-
- szDrive[ 0 ] = 'A';
- while(idx--) {
- do
- {
- ulDriveMap >>= 1;
- szDrive[ 0 ]++;
- } while(ulDriveMap && (ulDriveMap & 1) == 0);
- if (!ulDriveMap) return NULL;
- }
-
- return szDrive;
-}
-
-//============================================================
-// osd_get_full_path
-//============================================================
-
-file_error osd_get_full_path(char **dst, const char *path)
-{
- *dst = (char *)osd_malloc_array(CCHMAXPATH + 1);
- if (*dst == NULL)
- return FILERR_OUT_OF_MEMORY;
-
- _abspath(*dst, path, CCHMAXPATH + 1);
- return FILERR_NONE;
-}