>From 620658a67473fa00427460b23142ec3733c55d99 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Tue, 2 Mar 2021 01:48:39 +0100 Subject: [PATCH 2/5] Fix a compilation error with GCC < 4.6. * libpoke/pvm-program-point.h: New file, extracted from libpoke/pvm-program.h. * libpoke/pvm-program.h: Include it. (pvm_program_program_point): Remove type definition. * libpoke/pvm-val.h: Likewise. * libpoke/Makefile.am (libpoke_la_SOURCES): Add pvm-program-point.h. --- libpoke/Makefile.am | 1 + libpoke/pvm-program-point.h | 24 ++++++++++++++++++++++++ libpoke/pvm-program.h | 3 +-- libpoke/pvm-val.h | 2 +- 4 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 libpoke/pvm-program-point.h diff --git a/libpoke/Makefile.am b/libpoke/Makefile.am index d7f88ca..ee5a72d 100644 --- a/libpoke/Makefile.am +++ b/libpoke/Makefile.am @@ -54,6 +54,7 @@ libpoke_la_SOURCES = libpoke.h libpoke.c \ pvm-env.c \ pvm-alloc.h pvm-alloc.c \ pvm-program.h pvm-program.c \ + pvm-program-point.h \ pvm.jitter \ ios.c ios.h ios-dev.h \ ios-dev-file.c ios-dev-mem.c \ diff --git a/libpoke/pvm-program-point.h b/libpoke/pvm-program-point.h new file mode 100644 index 0000000..2088de4 --- /dev/null +++ b/libpoke/pvm-program-point.h @@ -0,0 +1,24 @@ +/* pvm-program-point.h - Type of program entry point. */ + +/* Copyright (C) 2020, 2021 Jose E. Marchesi */ + +/* This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef PVM_PROGRAM_POINT_H +#define PVM_PROGRAM_POINT_H + +typedef void *pvm_program_program_point; /* XXX better name */ + +#endif /* ! PVM_PROGRAM_POINT_H */ diff --git a/libpoke/pvm-program.h b/libpoke/pvm-program.h index d878ef7..1b7b02e 100644 --- a/libpoke/pvm-program.h +++ b/libpoke/pvm-program.h @@ -19,10 +19,9 @@ #ifndef PVM_PROGRAM_H #define PVM_PROGRAM_H +#include "pvm-program-point.h" #include "pvm-vm.h" -typedef void *pvm_program_program_point; /* XXX better name */ - /* Initialize and finalize the pvm-program subsystem. */ void pvm_program_init (void); diff --git a/libpoke/pvm-val.h b/libpoke/pvm-val.h index 0c45f7d..a64ef8f 100644 --- a/libpoke/pvm-val.h +++ b/libpoke/pvm-val.h @@ -21,6 +21,7 @@ #include #include +#include "pvm-program-point.h" /* The least-significative bits of pvm_val are reserved for the tag, which specifies the type of the value. */ @@ -501,7 +502,6 @@ typedef struct pvm_type *pvm_type; #define PVM_VAL_CLS_ENV(V) (PVM_VAL_CLS((V))->env) typedef struct pvm_program *pvm_program; -typedef void *pvm_program_program_point; struct pvm_cls { -- 2.7.4