2015-05-21 Florian Weimer <fweimer@redhat.com>
+ * stdio-common/vfprintf.c (LABEL, JUMP_TABLE_BASE_LABEL, REF):
+ Adjust jump table label generation macros.
+
+2015-05-21 Florian Weimer <fweimer@redhat.com>
+
* stdio-common/vfprintf.c (vfprintf): Move local variables
args_malloced, specs, specs_malloced, and the code after
do_positional to the printf_positional function.
#define NOT_IN_JUMP_RANGE(Ch) ((Ch) < L_(' ') || (Ch) > L_('z'))
#define CHAR_CLASS(Ch) (jump_table[(INT_T) (Ch) - L_(' ')])
+#define LABEL(Name) do_##Name
#ifdef SHARED
/* 'int' is enough and it saves some space on 64 bit systems. */
# define JUMP_TABLE_TYPE const int
+# define JUMP_TABLE_BASE_LABEL do_form_unknown
+# define REF(Name) &&do_##Name - &&JUMP_TABLE_BASE_LABEL
# define JUMP(ChExpr, table) \
do \
{ \
while (0)
#else
# define JUMP_TABLE_TYPE const void *const
+# define REF(Name) &&do_##Name
# define JUMP(ChExpr, table) \
do \
{ \
/* Process whole format string. */
do
{
-#ifdef SHARED
-# define JUMP_TABLE_BASE_LABEL do_form_unknown
-# define REF(Name) (&&do_##Name - &&JUMP_TABLE_BASE_LABEL)
-#else
-# define REF(Name) &&do_##Name
-#endif
-#define LABEL(Name) do_##Name
STEP0_3_TABLE;
STEP4_TABLE;
/* Now walk through all format specifiers and process them. */
for (; (size_t) nspecs_done < nspecs; ++nspecs_done)
{
-#undef REF
-#ifdef SHARED
-# undef JUMP_TABLE_BASE_LABEL
-# define JUMP_TABLE_BASE_LABEL do2_form_unknown
-# define REF(Name) (&&do2_##Name - &&JUMP_TABLE_BASE_LABEL)
-#else
-# define REF(Name) &&do2_##Name
-#endif
-#undef LABEL
-#define LABEL(Name) do2_##Name
STEP4_TABLE;
int is_negative;