Avoid false positives in fs.lst, partmap.lst, and video.lst due to
prototype declarations. * genmk.rb (PModule::rule): Define GRUB_LST_GENERATOR when generating fs, partmap, and video lists. * include/grub/fs.h (grub_fs_register): Omit prototype if GRUB_LST_GENERATOR is defined. * include/grub/partition.h (grub_partition_map_register): Likewise. * include/grub/video.h (grub_video_register): Likewise.
This commit is contained in:
parent
1c8f0f8d11
commit
7beac90c5f
5 changed files with 21 additions and 3 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2010-06-12 Colin Watson <cjwatson@ubuntu.com>
|
||||
|
||||
Avoid false positives in fs.lst, partmap.lst, and video.lst due to
|
||||
prototype declarations.
|
||||
|
||||
* genmk.rb (PModule::rule): Define GRUB_LST_GENERATOR when
|
||||
generating fs, partmap, and video lists.
|
||||
* include/grub/fs.h (grub_fs_register): Omit prototype if
|
||||
GRUB_LST_GENERATOR is defined.
|
||||
* include/grub/partition.h (grub_partition_map_register): Likewise.
|
||||
* include/grub/video.h (grub_video_register): Likewise.
|
||||
|
||||
2010-06-12 Javier Martín <lordhabbit@gmail.com>
|
||||
|
||||
* include/grub/types.h: Check for GRUB_CPU_SIZEOF_LONG when appropriate.
|
||||
|
|
6
genmk.rb
6
genmk.rb
|
@ -228,7 +228,7 @@ VIDEOFILES += #{video}
|
|||
|
||||
#{fs}: #{src} $(#{src}_DEPENDENCIES) genfslist.sh
|
||||
set -e; \
|
||||
$(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) #{extra_flags} $(TARGET_#{flag}) $(#{prefix}_#{flag}) -E $< \
|
||||
$(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) #{extra_flags} -DGRUB_LST_GENERATOR $(TARGET_#{flag}) $(#{prefix}_#{flag}) -E $< \
|
||||
| sh $(srcdir)/genfslist.sh #{symbolic_name} > $@ || (rm -f $@; exit 1)
|
||||
|
||||
#{parttool}: #{src} $(#{src}_DEPENDENCIES) genparttoollist.sh
|
||||
|
@ -238,7 +238,7 @@ VIDEOFILES += #{video}
|
|||
|
||||
#{partmap}: #{src} $(#{src}_DEPENDENCIES) genpartmaplist.sh
|
||||
set -e; \
|
||||
$(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) #{extra_flags} $(TARGET_#{flag}) $(#{prefix}_#{flag}) -E $< \
|
||||
$(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) #{extra_flags} -DGRUB_LST_GENERATOR $(TARGET_#{flag}) $(#{prefix}_#{flag}) -E $< \
|
||||
| sh $(srcdir)/genpartmaplist.sh #{symbolic_name} > $@ || (rm -f $@; exit 1)
|
||||
|
||||
#{handler}: #{src} $(#{src}_DEPENDENCIES) genhandlerlist.sh
|
||||
|
@ -253,7 +253,7 @@ VIDEOFILES += #{video}
|
|||
|
||||
#{video}: #{src} $(#{src}_DEPENDENCIES) genvideolist.sh
|
||||
set -e; \
|
||||
$(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) #{extra_flags} $(TARGET_#{flag}) $(#{prefix}_#{flag}) -E $< \
|
||||
$(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) #{extra_flags} -DGRUB_LST_GENERATOR $(TARGET_#{flag}) $(#{prefix}_#{flag}) -E $< \
|
||||
| sh $(srcdir)/genvideolist.sh #{symbolic_name} > $@ || (rm -f $@; exit 1)
|
||||
|
||||
"
|
||||
|
|
|
@ -91,11 +91,13 @@ typedef int (*grub_fs_autoload_hook_t) (void);
|
|||
extern grub_fs_autoload_hook_t EXPORT_VAR(grub_fs_autoload_hook);
|
||||
extern grub_fs_t EXPORT_VAR (grub_fs_list);
|
||||
|
||||
#ifndef GRUB_LST_GENERATOR
|
||||
static inline void
|
||||
grub_fs_register (grub_fs_t fs)
|
||||
{
|
||||
grub_list_push (GRUB_AS_LIST_P (&grub_fs_list), GRUB_AS_LIST (fs));
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline void
|
||||
grub_fs_unregister (grub_fs_t fs)
|
||||
|
|
|
@ -77,12 +77,14 @@ char *EXPORT_FUNC(grub_partition_get_name) (const grub_partition_t partition);
|
|||
|
||||
extern grub_partition_map_t EXPORT_VAR(grub_partition_map_list);
|
||||
|
||||
#ifndef GRUB_LST_GENERATOR
|
||||
static inline void
|
||||
grub_partition_map_register (grub_partition_map_t partmap)
|
||||
{
|
||||
grub_list_push (GRUB_AS_LIST_P (&grub_partition_map_list),
|
||||
GRUB_AS_LIST (partmap));
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline void
|
||||
grub_partition_map_unregister (grub_partition_map_t partmap)
|
||||
|
|
|
@ -264,6 +264,7 @@ typedef struct grub_video_adapter *grub_video_adapter_t;
|
|||
|
||||
extern grub_video_adapter_t EXPORT_VAR(grub_video_adapter_list);
|
||||
|
||||
#ifndef GRUB_LST_GENERATOR
|
||||
/* Register video driver. */
|
||||
static inline void
|
||||
grub_video_register (grub_video_adapter_t adapter)
|
||||
|
@ -271,6 +272,7 @@ grub_video_register (grub_video_adapter_t adapter)
|
|||
grub_list_push (GRUB_AS_LIST_P (&grub_video_adapter_list),
|
||||
GRUB_AS_LIST (adapter));
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Unregister video driver. */
|
||||
static inline void
|
||||
|
|
Loading…
Reference in a new issue