Fixed some compilations problems in Linux. And a bug in file_system to get the root / file-item

key.
This commit is contained in:
David Capello 2008-02-05 13:54:30 +00:00
parent 528eaab937
commit 685ec05e3f
3 changed files with 19 additions and 7 deletions

View File

@ -73,6 +73,10 @@
#define FA_TO_SHOW FA_RDONLY | FA_DIREC | FA_ARCH | FA_SYSTEM
#endif
#ifndef MAX_PATH
# define MAX_PATH 4096
#endif
/* a position in the file-system */
struct FileItem
{
@ -912,6 +916,10 @@ static char *remove_backslash(char *filename)
removed */
if (len == 3 && filename[1] == DEVICE_SEPARATOR)
return filename;
#else
/* this is just the root '/' slash */
if (len == 1)
return filename;
#endif
filename[len-1] = 0;
}

View File

@ -39,6 +39,10 @@
# define HAVE_DRIVES
#endif
#ifndef MAX_PATH
# define MAX_PATH 4096
#endif
/* Variables used only to maintain the history of navigation. */
static JLink navigation_position = NULL; /* current position in the navigation history */
static JList navigation_history = NULL; /* set of FileItems navigated */

View File

@ -40,26 +40,26 @@
defined ALLEGRO_MACOSX || \
defined ALLEGRO_BEOS || \
defined ALLEGRO_QNX
#define UNIX_LIKE
# define UNIX_LIKE
#endif
#if defined ALLEGRO_WINDOWS
#include <winalleg.h>
#include <process.h>
# include <winalleg.h>
# include <process.h>
#elif defined UNIX_LIKE
#include <pthread.h>
# include <pthread.h>
#endif
#if defined UNIX_LIKE
struct pthread_proxy_data {
void (*proc)(JThread thread, void *data);
void (*proc)(void *data);
void *data;
};
static void *pthread_proxy(void *arg)
{
pthread_proxy_data *ptr = arg;
void (*proc)(JThread thread, void *data) = ptr->proc;
struct pthread_proxy_data *ptr = arg;
void (*proc)(void *data) = ptr->proc;
void *data = ptr->data;
jfree(ptr);