sgi build patches

SVN revision: 14074
This commit is contained in:
Carsten Haitzler 2005-04-02 15:59:55 +00:00
parent 3f48dd037d
commit a469511a8b
3 changed files with 33 additions and 3 deletions

View File

@ -9,6 +9,13 @@
# ifdef __cplusplus # ifdef __cplusplus
extern "C" { extern "C" {
# endif # endif
#ifdef __sgi
#define __FUNCTION__ "unknown"
#ifndef __cplusplus
#define inline
#endif
#endif
# define PRIME_TABLE_MAX 21 # define PRIME_TABLE_MAX 21
# define PRIME_MIN 17 # define PRIME_MIN 17
@ -102,7 +109,7 @@ extern "C" {
# else /* No pthreads available */ # else /* No pthreads available */
# define ECORE_DECLARE_LOCKS struct { } locks # define ECORE_DECLARE_LOCKS
# define ECORE_INIT_LOCKS(structure) # define ECORE_INIT_LOCKS(structure)
# define ECORE_READ_LOCK(structure) # define ECORE_READ_LOCK(structure)
# define ECORE_READ_UNLOCK(structure) # define ECORE_READ_UNLOCK(structure)
@ -325,10 +332,17 @@ extern "C" {
* of the message and checks that it is to be printed at the current debugging * of the message and checks that it is to be printed at the current debugging
* level */ * level */
# ifndef DPRINTF # ifndef DPRINTF
# define DPRINTF(debug, format, args...) \ # ifdef __sgi
# define DPRINTF(debug, format, args) \
if (debug >= DEBUG_LEVEL) \ if (debug >= DEBUG_LEVEL) \
fprintf(stderr, format, args); fprintf(stderr, format, args);
# else
# define DPRINTF(debug, format, args...) \
if (debug >= DEBUG_LEVEL) \
fprintf(stderr, format, args);
# endif
# endif # endif
/* convenience macros for checking pointer parameters for non-NULL */ /* convenience macros for checking pointer parameters for non-NULL */
# ifndef CHECK_PARAM_POINTER_RETURN # ifndef CHECK_PARAM_POINTER_RETURN

View File

@ -3,8 +3,13 @@
/* debug */ /* debug */
extern int DEBUG; extern int DEBUG;
#ifdef __sgi
# define D
# define E
#else
# define D(fmt,args...) do { if(DEBUG>=0) fprintf(stderr,fmt,## args); } while(0); # define D(fmt,args...) do { if(DEBUG>=0) fprintf(stderr,fmt,## args); } while(0);
# define E(lvl,args...) do { if(DEBUG>=(lvl)) fprintf(stderr,## args); } while(0) # define E(lvl,args...) do { if(DEBUG>=(lvl)) fprintf(stderr,## args); } while(0)
#endif
typedef struct _Ecore_Config_DB_File Ecore_Config_DB_File; typedef struct _Ecore_Config_DB_File Ecore_Config_DB_File;

View File

@ -12,6 +12,10 @@ typedef struct _Ecore_Ipc_Client Ecore_Ipc_Client;
typedef struct _Ecore_Ipc_Server Ecore_Ipc_Server; typedef struct _Ecore_Ipc_Server Ecore_Ipc_Server;
typedef struct _Ecore_Ipc_Msg_Head Ecore_Ipc_Msg_Head; typedef struct _Ecore_Ipc_Msg_Head Ecore_Ipc_Msg_Head;
#ifdef __sgi
#pragma pack 4
#endif
struct _Ecore_Ipc_Msg_Head struct _Ecore_Ipc_Msg_Head
{ {
int head; int head;
@ -21,7 +25,14 @@ struct _Ecore_Ipc_Msg_Head
int ref_to; int ref_to;
int response; int response;
int size; int size;
} __attribute__ ((packed)); }
#ifdef _GNU_C_
__attribute__ ((packed));
#endif
;
#ifdef __sgi
#pragma pack 0
#endif
struct _Ecore_Ipc_Client struct _Ecore_Ipc_Client
{ {