/*
- * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved.
+ * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
#ifndef FIRM_COMMON_IRTOOLS_H
#define FIRM_COMMON_IRTOOLS_H
-#include "firm_config.h"
#include "firm_types.h"
-#ifdef WITH_LIBCORE
-#include <libcore/lc_opts.h>
+#include "lc_opts.h"
lc_opt_entry_t *firm_opt_get_root(void);
-#endif
#include "pset.h"
#define MAX(x, y) ((x) > (y) ? (x) : (y))
#define MIN(x, y) ((x) < (y) ? (x) : (y))
+/* calculate the address of the one past last element of an array whose size is
+ * known statically */
+#define ENDOF(x) ((x) + sizeof(x) / sizeof(*(x)))
+
/**
* Three valued compare as demanded by e.g. qsort(3)
* @param c A number.