From 2e8f431fc1fd63cde339b620cd53d869116fc94f Mon Sep 17 00:00:00 2001 From: mquinson Date: Fri, 10 Dec 2004 11:45:38 +0000 Subject: [PATCH] define max only when not previously defined (win32 defines it); move xbt_abort to a more logical header (sysdep->error); fix some (c) dates git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@606 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- include/xbt/config.h | 2 +- include/xbt/dict.h | 4 ++-- include/xbt/dynar.h | 4 ++-- include/xbt/error.h | 4 +++- include/xbt/log.h | 2 +- include/xbt/misc.h | 14 ++++++++++---- include/xbt/sysdep.h | 3 --- 7 files changed, 19 insertions(+), 14 deletions(-) diff --git a/include/xbt/config.h b/include/xbt/config.h index 54472225df..c75197705f 100644 --- a/include/xbt/config.h +++ b/include/xbt/config.h @@ -4,7 +4,7 @@ /* This is useful to build named structs, like option or property sets. */ -/* Copyright (c) 2004 Martin Quinson. All rights reserved. */ +/* Copyright (c) 2001,2002,2003,2004 Martin Quinson. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ diff --git a/include/xbt/dict.h b/include/xbt/dict.h index 2728e7d99b..19cd9cf506 100644 --- a/include/xbt/dict.h +++ b/include/xbt/dict.h @@ -1,8 +1,8 @@ /* $Id$ */ -/* xbt/dict.h -- api to a generic dictionary */ +/* xbt/dict.h -- api to a generic dictionary */ -/* Copyright (c) 2004 Martin Quinson. All rights reserved. */ +/* Copyright (c) 2003, 2004 Martin Quinson. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ diff --git a/include/xbt/dynar.h b/include/xbt/dynar.h index edf1024c2c..64136a4c3d 100644 --- a/include/xbt/dynar.h +++ b/include/xbt/dynar.h @@ -1,8 +1,8 @@ /* $Id$ */ -/* dynar - a generic dynamic array */ +/* dynar - a generic dynamic array */ -/* Copyright (c) 2004 Martin Quinson. All rights reserved. */ +/* Copyright (c) 2003, 2004 Martin Quinson. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ diff --git a/include/xbt/error.h b/include/xbt/error.h index 63af9b353f..0af48fadc4 100644 --- a/include/xbt/error.h +++ b/include/xbt/error.h @@ -2,7 +2,7 @@ /* xbt/error.h - Error tracking support */ -/* Copyright (c) 2004 Martin Quinson. All rights reserved. */ +/* Copyright (c) 2003, 2004 Martin Quinson. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -21,6 +21,8 @@ BEGIN_DECL +void xbt_abort(void) _XBT_GNUC_NORETURN; + typedef enum { no_error=0, /* succes */ mismatch_error=1, /* The provided ID does not match */ diff --git a/include/xbt/log.h b/include/xbt/log.h index 35b233ad41..e767d73614 100644 --- a/include/xbt/log.h +++ b/include/xbt/log.h @@ -2,7 +2,7 @@ /* log - a generic logging facility in the spirit of log4j */ -/* Copyright (c) 2004 Martin Quinson. All rights reserved. */ +/* Copyright (c) 2003, 2004 Martin Quinson. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ diff --git a/include/xbt/misc.h b/include/xbt/misc.h index 98e18f93dc..0ec724cec5 100644 --- a/include/xbt/misc.h +++ b/include/xbt/misc.h @@ -1,8 +1,10 @@ /* $Id$ */ -/* xbt.h - Public interface to the xbt (gras's toolbox) */ +/* xbt.h - Public interface to the xbt (gras's toolbox) */ -/* Copyright (c) 2004 Arnaud Legrand. All rights reserved. */ +/* Copyright (c) 2004 Martin Quinson. */ +/* Copyright (c) 2004 Arnaud Legrand. */ +/* All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -10,8 +12,12 @@ #ifndef XBT_MISC_H #define XBT_MISC_H -#define max(a, b) (((a) > (b))?(a):(b)) -#define min(a, b) (((a) < (b))?(a):(b)) +#ifndef max +# define max(a, b) (((a) > (b))?(a):(b)) +#endif +#ifndef min +# define min(a, b) (((a) < (b))?(a):(b)) +#endif #define TRUE 1 #define FALSE 0 diff --git a/include/xbt/sysdep.h b/include/xbt/sysdep.h index 9435c96a57..b94cfb9faa 100644 --- a/include/xbt/sysdep.h +++ b/include/xbt/sysdep.h @@ -72,9 +72,6 @@ BEGIN_DECL # define _XBT_INLINE #endif - -void xbt_abort(void) _XBT_GNUC_NORETURN; - END_DECL #include "xbt/error.h" /* needed for xbt_die */ -- 2.20.1