Skip to content

Commit

Permalink
rename included C files to foo.inc.c, remove osdep.h
Browse files Browse the repository at this point in the history
osdep.h is only needed for files that are compiled directly.
Remove it from included C source files, and rename them to
*.inc.c so that scripts/clean-includes knows to skip them.

Cc: Eric Blake <[email protected]>
Cc: Michael S. Tsirkin <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
  • Loading branch information
bonzini committed May 11, 2018
1 parent 3ff333e commit 5b27a92
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 16 deletions.
2 changes: 1 addition & 1 deletion target/cris/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -3047,7 +3047,7 @@ static unsigned int crisv32_decoder(CPUCRISState *env, DisasContext *dc)
return insn_len;
}

#include "translate_v10.c"
#include "translate_v10.inc.c"

/*
* Delay slots on QEMU/CRIS.
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion target/mips/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -20499,7 +20499,7 @@ void mips_tcg_init(void)
"fcr31");
}

#include "translate_init.c"
#include "translate_init.inc.c"

void cpu_mips_realize_env(CPUMIPSState *env)
{
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion target/ppc/int_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ target_ulong helper_divso(CPUPPCState *env, target_ulong arg1,
target_ulong helper_602_mfrom(target_ulong arg)
{
if (likely(arg < 602)) {
#include "mfrom_table.c"
#include "mfrom_table.inc.c"
return mfrom_ROM_table[arg];
} else {
return 0;
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion target/ppc/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -6991,7 +6991,7 @@ GEN_HANDLER2_E(trechkpt, "trechkpt", 0x1F, 0x0E, 0x1F, 0x03FFF800, \
};

#include "helper_regs.h"
#include "translate_init.c"
#include "translate_init.inc.c"

/*****************************************************************************/
/* Misc PowerPC helpers */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/

#include "qemu/osdep.h"
#include "disas/bfd.h"
#include "exec/gdbstub.h"
#include "kvm_ppc.h"
Expand Down
22 changes: 11 additions & 11 deletions ui/vnc-enc-zrle.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,56 +199,56 @@ static void zrle_write_u8(VncState *vs, uint8_t value)

#define ZRLE_BPP 8
#define ZYWRLE_ENDIAN ENDIAN_NO
#include "vnc-enc-zrle-template.c"
#include "vnc-enc-zrle.inc.c"
#undef ZRLE_BPP

#define ZRLE_BPP 15
#undef ZYWRLE_ENDIAN
#define ZYWRLE_ENDIAN ENDIAN_LITTLE
#include "vnc-enc-zrle-template.c"
#include "vnc-enc-zrle.inc.c"

#undef ZYWRLE_ENDIAN
#define ZYWRLE_ENDIAN ENDIAN_BIG
#include "vnc-enc-zrle-template.c"
#include "vnc-enc-zrle.inc.c"

#undef ZRLE_BPP
#define ZRLE_BPP 16
#undef ZYWRLE_ENDIAN
#define ZYWRLE_ENDIAN ENDIAN_LITTLE
#include "vnc-enc-zrle-template.c"
#include "vnc-enc-zrle.inc.c"

#undef ZYWRLE_ENDIAN
#define ZYWRLE_ENDIAN ENDIAN_BIG
#include "vnc-enc-zrle-template.c"
#include "vnc-enc-zrle.inc.c"

#undef ZRLE_BPP
#define ZRLE_BPP 32
#undef ZYWRLE_ENDIAN
#define ZYWRLE_ENDIAN ENDIAN_LITTLE
#include "vnc-enc-zrle-template.c"
#include "vnc-enc-zrle.inc.c"

#undef ZYWRLE_ENDIAN
#define ZYWRLE_ENDIAN ENDIAN_BIG
#include "vnc-enc-zrle-template.c"
#include "vnc-enc-zrle.inc.c"

#define ZRLE_COMPACT_PIXEL 24a
#undef ZYWRLE_ENDIAN
#define ZYWRLE_ENDIAN ENDIAN_LITTLE
#include "vnc-enc-zrle-template.c"
#include "vnc-enc-zrle.inc.c"

#undef ZYWRLE_ENDIAN
#define ZYWRLE_ENDIAN ENDIAN_BIG
#include "vnc-enc-zrle-template.c"
#include "vnc-enc-zrle.inc.c"

#undef ZRLE_COMPACT_PIXEL
#define ZRLE_COMPACT_PIXEL 24b
#undef ZYWRLE_ENDIAN
#define ZYWRLE_ENDIAN ENDIAN_LITTLE
#include "vnc-enc-zrle-template.c"
#include "vnc-enc-zrle.inc.c"

#undef ZYWRLE_ENDIAN
#define ZYWRLE_ENDIAN ENDIAN_BIG
#include "vnc-enc-zrle-template.c"
#include "vnc-enc-zrle.inc.c"
#undef ZRLE_COMPACT_PIXEL
#undef ZRLE_BPP

Expand Down
File renamed without changes.

0 comments on commit 5b27a92

Please sign in to comment.