/* Keeping a unique copy of strings.
- Copyright (C) 2002-2003, 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2008-2015 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
#ifndef UNIQSTR_H_
# define UNIQSTR_H_
+# include <stdio.h>
+
/*-----------------------------------------.
| Pointers to unique copies of C strings. |
`-----------------------------------------*/
strings, use UNIQSTR_CONCAT, which is a convenient wrapper around
this function. */
uniqstr uniqstr_vsprintf (char const *format, ...)
- __attribute__ ((__format__ (__printf__, 1, 2)));
+ _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2);
/* Two uniqstr values have the same value iff they are the same. */
# define UNIQSTR_EQ(Ustr1, Ustr2) (!!((Ustr1) == (Ustr2)))
/* Compare two uniqstr a la strcmp: negative for <, nul for =, and
positive for >. Undefined order, relies on addresses. */
-# define UNIQSTR_CMP(USTR1, USTR2) ((USTR1) - (USTR2))
+int uniqstr_cmp (uniqstr u1, uniqstr u2);
/* Die if STR is not a uniqstr. */
void uniqstr_assert (char const *str);