--- rpl/src/interface_cas.cpp 2014/05/17 14:06:48 1.41 +++ rpl/src/interface_cas.cpp 2020/01/16 08:57:42 1.64 @@ -1,7 +1,7 @@ /* ================================================================================ - RPL/2 (R) version 4.1.18 - Copyright (C) 1989-2014 Dr. BERTRAND Joël + RPL/2 (R) version 4.1.32 + Copyright (C) 1989-2020 Dr. BERTRAND Joël This file is part of RPL/2. @@ -19,7 +19,9 @@ ================================================================================ */ + #ifdef RPLCAS +# define RPLCXX // Giac inclut et définit sem_t. Or l'émulation // des IPCS POSIX requiert une redéfinition de sem_t. @@ -27,13 +29,16 @@ # ifdef IPCS_SYSV // NetBSD : _SEMAPHORE_H_ # define _SEMAPHORE_H_ +// Linux : _SEMAPHORE_H +# define _SEMAPHORE_H # endif # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wstrict-aliasing" # pragma GCC diagnostic ignored "-Wunused-parameter" # pragma GCC diagnostic ignored "-Wempty-body" -# include "giac.h" +# pragma GCC diagnostic ignored "-Wunknown-pragmas" +# include "giacPCH.h" # pragma GCC diagnostic pop # undef PACKAGE @@ -231,7 +236,7 @@ conversion_rpl_vers_cas(struct_processus strstr(reinterpret_cast(index), (const char *) "relax"))) != NULL) { - strncpy(reinterpret_cast(index), " +", 5); + memcpy(reinterpret_cast(index), " +", 5); } // Si le résultat vaut infinity, on rajoute le signe +. @@ -416,11 +421,13 @@ conversion_cas_vers_rpl(struct_processus ================================================================================ */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" void interface_cas(struct_processus *s_etat_processus, enum t_rplcas_commandes commande) { -# ifdef RPLCAS +#ifdef RPLCAS struct_objet *s_objet_argument_1; struct_objet *s_objet_argument_2; struct_objet *s_objet_temporaire; @@ -442,7 +449,7 @@ interface_cas(struct_processus *s_etat_p { s_etat_processus->contexte_cas = new giac::context; } - catch(bad_alloc exception) + catch(bad_alloc &exception) { s_etat_processus->erreur_systeme = d_es_allocation_memoire; return; @@ -516,7 +523,7 @@ interface_cas(struct_processus *s_etat_p reinterpret_cast(const_cast( chaine.c_str()))); } - catch(bad_alloc exception) + catch(bad_alloc &exception) { s_etat_processus->erreur_systeme = d_es_allocation_memoire; } @@ -677,7 +684,7 @@ interface_cas(struct_processus *s_etat_p reinterpret_cast(const_cast( chaine.c_str()))); } - catch(bad_alloc exception) + catch(bad_alloc &exception) { s_etat_processus->erreur_systeme = d_es_allocation_memoire; } @@ -717,5 +724,6 @@ interface_cas(struct_processus *s_etat_p #endif } +#pragma GCC diagnostic pop // vim: ts=4