Architecture specific header files

Petr Pisar ppisar at redhat.com
Tue Jun 25 14:20:04 UTC 2013


On 2013-06-25, Vít Ondruch <vondruch at redhat.com> wrote:
> Is there some common practice, where to place architecture specific 
> header files? From output of the following command, I can't see any such 
> place.
>
I dont't think so. SDL moves architecture specific header file into
a private directory:

# Rename SDL_config.h to SDL_config-<arch>.h to avoid file conflicts on
# multilib systems and install SDL_config.h wrapper
mv %{buildroot}/%{_includedir}/SDL/SDL_config.h
%{buildroot}/%{_includedir}/SDL/SDL_config-%{_arch}.h
install -m644 %{SOURCE1} %{buildroot}/%{_includedir}/SDL/SDL_config.h

And installs a wrapper (SOURCE1) to replace the original location. The
wrapper is just a bunch of #if branches:

#if defined(__i386__)
#include "SDL_config-i386.h"
#elif defined(__ia64__)
#include "SDL_config-ia64.h"
[...]
#endif

Though a standardized path would be nice.

-- Petr




More information about the devel mailing list