Fixes for compiling under freebsd
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@562 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
a15de98314
commit
91d4dc20b9
4
aide.c
4
aide.c
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
#if defined(__WIN32__)
|
#if defined(__WIN32__)
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#elif defined(__macosx__)
|
#elif defined(__macosx__) || defined(__FreeBSD__)
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/mount.h>
|
#include <sys/mount.h>
|
||||||
#elif defined (__linux__)
|
#elif defined (__linux__)
|
||||||
@ -417,7 +417,7 @@ void Bouton_Stats(void)
|
|||||||
GetDiskFreeSpaceEx(Principal_Repertoire_courant,&tailleU,NULL,NULL);
|
GetDiskFreeSpaceEx(Principal_Repertoire_courant,&tailleU,NULL,NULL);
|
||||||
Taille = tailleU.QuadPart;
|
Taille = tailleU.QuadPart;
|
||||||
}
|
}
|
||||||
#elif defined(__linux__) || (__macosx__)
|
#elif defined(__linux__) || defined(__macosx__) || defined(__FreeBSD)
|
||||||
// Note: under MacOSX, both macros are defined anyway.
|
// Note: under MacOSX, both macros are defined anyway.
|
||||||
{
|
{
|
||||||
struct statfs Informations_Disque;
|
struct statfs Informations_Disque;
|
||||||
|
|||||||
@ -470,7 +470,7 @@ word Conversion_ANSI(SDL_keysym Sym)
|
|||||||
// This part was removed from the MacOSX port, but I put it back for others
|
// This part was removed from the MacOSX port, but I put it back for others
|
||||||
// as on Linux and Windows, it's what allows editing a text line with the keys
|
// as on Linux and Windows, it's what allows editing a text line with the keys
|
||||||
// SDLK_LEFT, SDLK_RIGHT, SDLK_HOME, SDLK_END etc.
|
// SDLK_LEFT, SDLK_RIGHT, SDLK_HOME, SDLK_END etc.
|
||||||
#ifndef __macosx__
|
#if !(defined(__macosx__) || defined(__FreeBSD__))
|
||||||
if ( Sym.unicode == 0)
|
if ( Sym.unicode == 0)
|
||||||
{
|
{
|
||||||
return Sym.sym;
|
return Sym.sym;
|
||||||
@ -546,7 +546,7 @@ word Conversion_ANSI(SDL_keysym Sym)
|
|||||||
// Touche entre 127 et 255
|
// Touche entre 127 et 255
|
||||||
if (Sym.unicode<256)
|
if (Sym.unicode<256)
|
||||||
{
|
{
|
||||||
#ifdef __macosx__
|
#if defined(__macosx__) || defined(__FreeBSD__)
|
||||||
// fc: Looks like there's a mismatch with delete & backspace
|
// fc: Looks like there's a mismatch with delete & backspace
|
||||||
// i don't why SDLK_DELETE was returned instead of SDLK_BACKSPACE
|
// i don't why SDLK_DELETE was returned instead of SDLK_BACKSPACE
|
||||||
if(Sym.unicode == 127)
|
if(Sym.unicode == 127)
|
||||||
|
|||||||
4
divers.c
4
divers.c
@ -673,7 +673,7 @@ void Zoomer_une_ligne(byte* Ligne_originale, byte* Ligne_zoomee,
|
|||||||
#if defined(__WIN32__)
|
#if defined(__WIN32__)
|
||||||
#define _WIN32_WINNT 0x0500
|
#define _WIN32_WINNT 0x0500
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#elif defined(__macosx__)
|
#elif defined(__macosx__) || defined(__FreeBSD__)
|
||||||
#include <sys/sysctl.h>
|
#include <sys/sysctl.h>
|
||||||
#elif defined(__BEOS__) || defined(__HAIKU__)
|
#elif defined(__BEOS__) || defined(__HAIKU__)
|
||||||
// sysinfo not implemented
|
// sysinfo not implemented
|
||||||
@ -701,7 +701,7 @@ unsigned long Memoire_libre(void)
|
|||||||
mstt.dwLength = sizeof(MEMORYSTATUSEX);
|
mstt.dwLength = sizeof(MEMORYSTATUSEX);
|
||||||
GlobalMemoryStatusEx(&mstt);
|
GlobalMemoryStatusEx(&mstt);
|
||||||
return mstt.ullAvailPhys;
|
return mstt.ullAvailPhys;
|
||||||
#elif defined(__macosx__)
|
#elif defined(__macosx__) || defined(__FreeBSD__)
|
||||||
int mib[2];
|
int mib[2];
|
||||||
int maxmem;
|
int maxmem;
|
||||||
size_t len;
|
size_t len;
|
||||||
|
|||||||
2
graph.c
2
graph.c
@ -1341,7 +1341,7 @@ void Tracer_rectangle_vide(short Debut_X,short Debut_Y,short Fin_X,short Fin_Y,b
|
|||||||
|
|
||||||
for (Pos_X=Debut_X;Pos_X<=Fin_X;Pos_X++)
|
for (Pos_X=Debut_X;Pos_X<=Fin_X;Pos_X++)
|
||||||
Afficher_pinceau(Pos_X, Fin_Y,Couleur,0);
|
Afficher_pinceau(Pos_X, Fin_Y,Couleur,0);
|
||||||
#ifdef __macosx__
|
#if defined(__macosx__) || defined(__FreeBSD__)
|
||||||
Mettre_Ecran_A_Jour(Debut_X,Fin_X,Fin_X-Debut_X,Fin_Y-Debut_Y);
|
Mettre_Ecran_A_Jour(Debut_X,Fin_X,Fin_X-Debut_X,Fin_Y-Debut_Y);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
2
init.c
2
init.c
@ -170,7 +170,7 @@ void Rechercher_drives(void)
|
|||||||
Liste_points_montage->me_mountdir);
|
Liste_points_montage->me_mountdir);
|
||||||
}
|
}
|
||||||
next = Liste_points_montage -> me_next;
|
next = Liste_points_montage -> me_next;
|
||||||
#ifndef __macosx__
|
#if !(defined(__macosx__) || defined(__FreeBSD__))
|
||||||
free(Liste_points_montage -> me_type);
|
free(Liste_points_montage -> me_type);
|
||||||
#endif
|
#endif
|
||||||
free(Liste_points_montage);
|
free(Liste_points_montage);
|
||||||
|
|||||||
2
main.c
2
main.c
@ -60,6 +60,8 @@
|
|||||||
#elif defined(__macosx__)
|
#elif defined(__macosx__)
|
||||||
#import <corefoundation/corefoundation.h>
|
#import <corefoundation/corefoundation.h>
|
||||||
#import <sys/param.h>
|
#import <sys/param.h>
|
||||||
|
#elif defined(__FreeBSD__)
|
||||||
|
#import <sys/param.h>
|
||||||
#elif defined(__AROS__) || defined(__BEOS__) || defined(__MORPHOS__) || defined(__GP2X__)
|
#elif defined(__AROS__) || defined(__BEOS__) || defined(__MORPHOS__) || defined(__GP2X__)
|
||||||
#include "realpath.h"
|
#include "realpath.h"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
#if(!defined(__WIN32__))&&(!defined(__amigaos4__))&&(!defined(__AROS__))&&(!defined(__MORPHOS__))
|
#if(!defined(__WIN32__))&&(!defined(__amigaos4__))&&(!defined(__AROS__))&&(!defined(__MORPHOS__))
|
||||||
|
|
||||||
// We don't use autoconf and all that in grafx2, so let's do the config here ...
|
// We don't use autoconf and all that in grafx2, so let's do the config here ...
|
||||||
#ifdef __macosx__ // MacOS X is POSIX compliant
|
#if defined(__macosx__)||defined(__FreeBSD__) // MacOS X is POSIX compliant
|
||||||
#define MOUNTED_GETMNTINFO
|
#define MOUNTED_GETMNTINFO
|
||||||
#elif defined(__BEOS__) || defined(__HAIKU__)
|
#elif defined(__BEOS__) || defined(__HAIKU__)
|
||||||
#define MOUNTED_FS_STAT_DEV
|
#define MOUNTED_FS_STAT_DEV
|
||||||
@ -444,7 +444,7 @@ read_file_system_list (bool need_fs_type)
|
|||||||
|
|
||||||
|
|
||||||
#ifdef MOUNTED_GETMNTINFO /* 4.4BSD. */
|
#ifdef MOUNTED_GETMNTINFO /* 4.4BSD. */
|
||||||
#ifdef __macosx__
|
#if defined(__macosx__) || defined(__FreeBSD__)
|
||||||
{
|
{
|
||||||
struct statfs *fsp;
|
struct statfs *fsp;
|
||||||
int entries;
|
int entries;
|
||||||
|
|||||||
6
pages.c
6
pages.c
@ -832,7 +832,7 @@ void Backup(void)
|
|||||||
// Sauve la page courante comme première page de backup et crée une nouvelle page
|
// Sauve la page courante comme première page de backup et crée une nouvelle page
|
||||||
// pur continuer à dessiner. Utilisé par exemple pour le fill
|
// pur continuer à dessiner. Utilisé par exemple pour le fill
|
||||||
{
|
{
|
||||||
#ifdef __macosx__
|
#if defined(__macosx__) || defined(__FreeBSD__)
|
||||||
S_Page Nouvelle_page;
|
S_Page Nouvelle_page;
|
||||||
#else
|
#else
|
||||||
S_Page *Nouvelle_page;
|
S_Page *Nouvelle_page;
|
||||||
@ -843,7 +843,7 @@ void Backup(void)
|
|||||||
Upload_infos_page_principal(Principal_Backups->Pages);
|
Upload_infos_page_principal(Principal_Backups->Pages);
|
||||||
|
|
||||||
// On crée un descripteur pour la nouvelle page courante
|
// On crée un descripteur pour la nouvelle page courante
|
||||||
#ifdef __macosx__
|
#if defined(__macosx__) || defined(__FreeBSD__)
|
||||||
Initialiser_S_Page(&Nouvelle_page);
|
Initialiser_S_Page(&Nouvelle_page);
|
||||||
|
|
||||||
// Enrichissement de l'historique
|
// Enrichissement de l'historique
|
||||||
@ -866,7 +866,7 @@ void Backup(void)
|
|||||||
memcpy(Principal_Ecran,Ecran_backup,Principal_Largeur_image*Principal_Hauteur_image);
|
memcpy(Principal_Ecran,Ecran_backup,Principal_Largeur_image*Principal_Hauteur_image);
|
||||||
|
|
||||||
// On détruit le descripteur de la page courante
|
// On détruit le descripteur de la page courante
|
||||||
#ifndef __macosx__
|
#if !(defined(__macosx__) || defined(__FreeBSD__))
|
||||||
free(Nouvelle_page);
|
free(Nouvelle_page);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
// METHODE_UPDATE peut ętre fixé depuis le makefile, sinon c'est ici:
|
// METHODE_UPDATE peut ętre fixé depuis le makefile, sinon c'est ici:
|
||||||
#ifndef METHODE_UPDATE
|
#ifndef METHODE_UPDATE
|
||||||
#ifdef __macosx__
|
#if defined(__macosx__) || defined(__FreeBSD__)
|
||||||
#define METHODE_UPDATE METHODE_UPDATE_PLEINE_PAGE
|
#define METHODE_UPDATE METHODE_UPDATE_PLEINE_PAGE
|
||||||
#else
|
#else
|
||||||
#define METHODE_UPDATE METHODE_UPDATE_PAR_CUMUL
|
#define METHODE_UPDATE METHODE_UPDATE_PAR_CUMUL
|
||||||
|
|||||||
2
setup.c
2
setup.c
@ -33,6 +33,8 @@
|
|||||||
#elif defined(__macosx__)
|
#elif defined(__macosx__)
|
||||||
#import <corefoundation/corefoundation.h>
|
#import <corefoundation/corefoundation.h>
|
||||||
#import <sys/param.h>
|
#import <sys/param.h>
|
||||||
|
#elif defined(__FreeBSD__)
|
||||||
|
#import <sys/param.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "struct.h"
|
#include "struct.h"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user