Compilation issue related to memory functions definition fixed (thanks Doug for reporting it).

This commit is contained in:
Frederic Culot 2010-03-22 08:16:33 +00:00
parent b6f84b3ef9
commit d220a35771
2 changed files with 26 additions and 17 deletions

View File

@ -1,3 +1,8 @@
2010-03-22 Frederic Culot <frederic@culot.org>
* src/calcurse.h: compilation issue related to memory functions
definition fixed (thanks Doug for reporting it)
2010-03-21 Frederic Culot <frederic@culot.org>
* src/wins.c (wins_refresh, wins_wrefresh, wins_doupdate)

View File

@ -1,4 +1,4 @@
/* $Id: calcurse.h,v 1.4 2010/03/21 10:17:03 culot Exp $ */
/* $Id: calcurse.h,v 1.5 2010/03/22 08:16:33 culot Exp $ */
/*
* Calcurse - text-based organizer
@ -80,22 +80,6 @@
# define bind_textdomain_codeset(Domain,Codeset) (Codeset)
#endif /* ENABLE_NLS */
/* Memory debugging functions. */
#ifdef CALCURSE_MEMORY_DEBUG
# define mem_malloc(s) dbg_malloc ((s), __FILE_POS__)
# define mem_calloc(n, s) dbg_calloc ((n), (s), __FILE_POS__)
# define mem_realloc(p, n, s) dbg_realloc ((p), (n), (s), __FILE_POS__)
# define mem_strdup(s) dbg_strdup ((s), __FILE_POS__)
# define mem_free(p) dbg_free ((p), __FILE_POS__)
#else /* MEMORY DEBUG disabled */
# define mem_malloc(s) xmalloc ((s))
# define mem_calloc(n, s) xcalloc ((n), (s))
# define mem_realloc(p, n, s) xrealloc ((p), (n), (s))
# define mem_strdup(s) xstrdup ((s))
# define mem_free(p) xfree ((p))
# define mem_stats()
#endif /* CALCURSE_MEMORY_DEBUG */
/* Paths configuration. */
#define DIR_NAME ".calcurse/"
#define TODO_PATH_NAME "todo"
@ -742,6 +726,15 @@ void *xcalloc (size_t, size_t);
void *xrealloc (void *, size_t, size_t);
char *xstrdup (const char *);
void xfree (void *);
#ifdef CALCURSE_MEMORY_DEBUG
# define mem_malloc(s) dbg_malloc ((s), __FILE_POS__)
# define mem_calloc(n, s) dbg_calloc ((n), (s), __FILE_POS__)
# define mem_realloc(p, n, s) dbg_realloc ((p), (n), (s), __FILE_POS__)
# define mem_strdup(s) dbg_strdup ((s), __FILE_POS__)
# define mem_free(p) dbg_free ((p), __FILE_POS__)
void *dbg_malloc (size_t, const char *);
void *dbg_calloc (size_t, size_t, const char *);
void *dbg_realloc (void *, size_t, size_t, const char *);
@ -749,6 +742,17 @@ char *dbg_strdup (const char *, const char *);
void dbg_free (void *, const char *);
void mem_stats (void);
#else /* MEMORY DEBUG disabled */
# define mem_malloc(s) xmalloc ((s))
# define mem_calloc(n, s) xcalloc ((n), (s))
# define mem_realloc(p, n, s) xrealloc ((p), (n), (s))
# define mem_strdup(s) xstrdup ((s))
# define mem_free(p) xfree ((p))
# define mem_stats()
#endif /* CALCURSE_MEMORY_DEBUG */
/* notify.c */
int notify_time_left (void);
unsigned notify_needs_reminder (void);