lsb

mkheader inserts #undef if *any* macro is found by the same name, even if in unrelated header

Bug #1327293 reported by Jeff Johnson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lsb
In Progress
Medium
Unassigned
Mandriva
In Progress
Medium

Bug Description

Perhaps not a problem, but a little disconcerting when a new add ripples
changes into existing headers.

libncursesw has a *lot* of macros, some with the same name as interfaces
included. In ncursesw/curses.h, similar to the upstream header, an "#undef foo"
is created by mkheader before the "extern foo" appears. What's a little odd is
that these propogate into other headers, for instance stdio.h picked one up:

=== modified file 'headers/stdio.h'
--- headers/stdio.h 2013-01-08 15:55:54 +0000
+++ headers/stdio.h 2011-01-31 15:56:05 +0000
@@ -198,7 +198,6 @@
     extern int asprintf(char **__ptr, const char *__fmt, ...);
     extern int vfscanf(FILE * __s, const char *__format, va_list __arg);
     extern int vscanf(const char *__format, va_list __arg);
-#undef vsscanf
     extern int vsscanf(const char *__s, const char *__format,
                       va_list __arg);
 #endif /* __LSB_VERSION__ >= 1.3 */

Probably doesn't do any harm, but I wonder if mkheader should possibly only
consider the current header and the inclusion chain for macros, before adding
the #undef.

Changed in mandriva:
importance: Unknown → Medium
status: Unknown → In Progress
Jeff Johnson (n3npq)
tags: added: mkheader
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.