From: mquinson Date: Fri, 11 Dec 2009 10:39:39 +0000 (+0000) Subject: missing file X-Git-Tag: SVN~845 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/c4b456eb4ff7aa5852e276391b24667431be5d84 missing file git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6881 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/include/simgrid_config.h.in b/include/simgrid_config.h.in new file mode 100644 index 0000000000..18e01d0894 --- /dev/null +++ b/include/simgrid_config.h.in @@ -0,0 +1,59 @@ +/* $Id$ */ + +/* simgrid_config.h - Results of the configure made visible to user code */ + +/* Copyright (c) 2009, Da SimGrid team. 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. */ + +#include "xbt/misc.h" /* XBT_PUBLIC */ + +#ifndef SIMGRID_PUBLIC_CONFIG_H +#define SIMGRID_PUBLIC_CONFIG_H + +/* Get the config */ +#undef SIMGRID_NEED_GETLINE +#undef SIMGRID_NEED_ASPRINTF +#undef SIMGRID_NEED_VASPRINTF +@need_getline@ +@need_asprintf@ +@need_vasprintf@ + +/* Use that config to declare missing elements */ +#ifdef SIMGRID_NEED_GETLINE +XBT_PUBLIC(long) getline(char **lineptr, size_t * n, FILE * stream); +#endif + + +/* snprintf related functions */ +/** @addtogroup XBT_str + * @{ */ +/** @brief print to allocated string (reimplemented when not provided by the system) + * + * The functions asprintf() and vasprintf() are analogues of + * sprintf() and vsprintf(), except that they allocate a string large + * enough to hold the output including the terminating null byte, and + * return a pointer to it via the first parameter. This pointer + * should be passed to free(3) to release the allocated storage when + * it is no longer needed. + */ +#if defined(SIMGRID_NEED_ASPRINTF)||defined(DOXYGEN) +XBT_PUBLIC(int) asprintf(char **ptr, const char *fmt, /*args */ + ...) _XBT_GNUC_PRINTF(2, 3); +#endif +/** @brief print to allocated string (reimplemented when not provided by the system) + * + * See asprintf() + */ +#if defined(SIMGRID_NEED_VASPRINTF)||defined(DOXYGEN) +XBT_PUBLIC(int) vasprintf(char **ptr, const char *fmt, va_list ap); +#endif +/** @brief print to allocated string + * + * Works just like asprintf(), but returns a pointer to the newly created string + */ +XBT_PUBLIC(char *) bprintf(const char *fmt, ...) _XBT_GNUC_PRINTF(1, 2); +/** @} */ + +#endif /* SIMGRID_PUBLIC_CONFIG_H */