diff options
author | Juergen Keil <jkeil@users.sourceforge.net> | 2001-09-06 18:38:11 +0000 |
---|---|---|
committer | Juergen Keil <jkeil@users.sourceforge.net> | 2001-09-06 18:38:11 +0000 |
commit | 94f33ff7e3b7140e78c014be1a68fe9c1ba17814 (patch) | |
tree | 56aacd13a3a2f5de4def305cceb2789cfa9bd807 /src/xine-engine | |
parent | 8d3fda905911b0b1cdadb33c00fb1f800e8f9320 (diff) | |
download | xine-lib-94f33ff7e3b7140e78c014be1a68fe9c1ba17814.tar.gz xine-lib-94f33ff7e3b7140e78c014be1a68fe9c1ba17814.tar.bz2 |
Trying to port the xine-lib sources to a non-gcc compiler
CVS patchset: 584
CVS date: 2001/09/06 18:38:11
Diffstat (limited to 'src/xine-engine')
-rw-r--r-- | src/xine-engine/load_plugins.c | 6 | ||||
-rw-r--r-- | src/xine-engine/monitor.h | 21 | ||||
-rw-r--r-- | src/xine-engine/utils.c | 19 | ||||
-rw-r--r-- | src/xine-engine/xine.c | 6 |
4 files changed, 39 insertions, 13 deletions
diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index 0bbd8bec0..f315a04c9 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: load_plugins.c,v 1.39 2001/08/23 13:27:24 jcdutton Exp $ + * $Id: load_plugins.c,v 1.40 2001/09/06 18:38:12 jkeil Exp $ * * * Load input/demux/audio_out/video_out/codec plugins @@ -46,6 +46,10 @@ #include "utils.h" #include "monitor.h" +#ifndef __GNUC__ +#define __FUNCTION__ __func__ +#endif + extern int errno; /** *************************************************************** diff --git a/src/xine-engine/monitor.h b/src/xine-engine/monitor.h index 38c1be91a..316e855d7 100644 --- a/src/xine-engine/monitor.h +++ b/src/xine-engine/monitor.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: monitor.h,v 1.3 2001/07/18 21:38:17 f1rmb Exp $ + * $Id: monitor.h,v 1.4 2001/09/06 18:38:12 jkeil Exp $ * * debug print and profiling functions * @@ -47,7 +47,11 @@ extern uint32_t xine_debug; #define LOOP (xine_debug & 0x8000>>11) // 16 #define GUI (xine_debug & 0x8000>>12) // 8 +#ifdef __GNUC__ #define perr(FMT,ARGS...) {fprintf(stderr, FMT, ##ARGS);fflush(stderr);} +#else /* C99 version: */ +#define perr(...) {fprintf(stderr, __VA_ARGS__);fflush(stderr);} +#endif #ifdef DEBUG @@ -57,11 +61,20 @@ extern uint32_t xine_debug; //#define perr(FMT,ARGS...) {fprintf(stderr, FMT, ##ARGS);fflush(stderr);} +#ifdef __GNUC__ #define xprintf(LVL, FMT, ARGS...) { \ if(LVL) { \ - printf(FMT, ##ARGS); \ + printf(FMT, ##ARGS); \ + } \ + } +#else /* C99 version: */ +#define xprintf(LVL, ...) { \ + if(LVL) { \ + printf(__VA_ARGS__); \ } \ } +#endif + /* * profiling */ @@ -80,7 +93,11 @@ void profiler_print_results (); //#define perr(FMT,ARGS...) +#ifdef __GNUC__ #define xprintf(LVL, FMT, ARGS...) +#else /* C99 version: */ +#define xprintf(LVL, ...) +#endif #define profiler_init() #define profiler_set_label(id, label) diff --git a/src/xine-engine/utils.c b/src/xine-engine/utils.c index 3f45e909c..5a9dc5573 100644 --- a/src/xine-engine/utils.c +++ b/src/xine-engine/utils.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: utils.c,v 1.3 2001/09/06 13:29:18 jkeil Exp $ + * $Id: utils.c,v 1.4 2001/09/06 18:38:12 jkeil Exp $ * */ #define _POSIX_PTHREAD_SEMANTICS 1 /* for 5-arg getpwuid_r on solaris */ @@ -35,25 +35,26 @@ #include <time.h> #include <sys/types.h> +#ifndef __GNUC__ +#define __FUNCTION__ __func__ +#endif + + /* * */ void *xmalloc(size_t size) { - void *ptrmalloc, *ptrmemset; + void *ptr; - if((ptrmalloc = malloc(size)) == NULL) { + if((ptr = malloc(size)) == NULL) { fprintf(stderr, "%s: malloc() failed: %s.\n", __FUNCTION__, strerror(errno)); return NULL; } - if((ptrmemset = memset(ptrmalloc, 0, size)) == NULL) { - fprintf(stderr, "%s: memset() failed: %s.\n", - __FUNCTION__, strerror(errno)); - return NULL; - } + memset(ptr, 0, size); - return ptrmemset; + return ptr; } /* diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index 20cc1153f..8af7b3461 100644 --- a/src/xine-engine/xine.c +++ b/src/xine-engine/xine.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine.c,v 1.57 2001/09/06 14:09:37 jkeil Exp $ + * $Id: xine.c,v 1.58 2001/09/06 18:38:12 jkeil Exp $ * * top-level xine functions * @@ -52,6 +52,10 @@ #include "monitor.h" #include "utils.h" +#ifndef __GNUC__ +#define __FUNCTION__ __func__ +#endif + /* debugging purposes only */ uint32_t xine_debug; |