--- rpl/src/rpl.h 2016/09/27 15:29:40 1.300 +++ rpl/src/rpl.h 2017/08/04 09:14:59 1.316 @@ -1,7 +1,7 @@ /* ================================================================================ - RPL/2 (R) version 4.1.26 - Copyright (C) 1989-2016 Dr. BERTRAND Joël + RPL/2 (R) version 4.1.28 + Copyright (C) 1989-2017 Dr. BERTRAND Joël This file is part of RPL/2. @@ -64,6 +64,11 @@ # define SA_ONSTACK 0 #endif +#ifdef BROKEN_SIGSEGV +# undef HAVE_STACK_OVERFLOW_RECOVERY +# undef HAVE_SIGSEGV_RECOVERY +#endif + #define DEBUG_TRACE uprintf("[%d/%X] %s(%d)\n", \ getpid(), pthread_self(), __FILE__, __LINE__); #define TEST_ABSENCE_FICHIER(nom) \ @@ -87,10 +92,10 @@ #include #include #include +#include #ifndef RPLARGS # include -# include # include # include # include @@ -215,7 +220,11 @@ # endif # include "sqlite3.h" -# include "sigsegv.h" + +# ifndef BROKEN_SIGSEGV +# include "sigsegv.h" +# endif + # ifdef OS2 // Bug de libsigsegv # undef HAVE_STACK_OVERFLOW_RECOVERY @@ -619,9 +628,9 @@ union semun } while(0) #ifdef __GLIBC__ -#include -#define __BACKTRACE -#define BACKTRACE(n) \ +# include +# define __BACKTRACE +# define BACKTRACE(n) \ do \ { \ void *buffer[n]; \ @@ -646,7 +655,7 @@ union semun pthread_mutex_unlock(&mutex); \ } while(0) #else -#define BACKTRACE(n) NOTICE("BACKTRACE only defined in glibc") +# define BACKTRACE(n) NOTICE("BACKTRACE only defined in glibc") #endif #ifdef __BACKTRACE @@ -692,23 +701,29 @@ pid_t debug_fork(); #endif #ifdef DEBUG_RETURN -#define return uprintf("[%d] Return from <%s()> at line #%d " \ +# define return uprintf("[%d] Return from <%s()> at line #%d " \ "(%s [%d])\n", (int) getpid(), __FUNCTION__, \ __LINE__, strerror(errno), errno); fflush(stdout); errno = 0; return #endif #ifdef DEBUG_MUTEX -#define pthread_mutex_lock(mutex) uprintf("[%d-%llu] Mutex %s (%p) " \ +# define pthread_mutex_lock(mutex) uprintf("[%d-%llu] Mutex %s (%p) " \ "locking at %s() " \ "line #%d\n", (int) getpid(), (unsigned long long) pthread_self(), \ #mutex, mutex, __FUNCTION__, __LINE__), fflush(stdout), \ pthread_mutex_lock(mutex) -#define pthread_mutex_unlock(mutex) uprintf("[%d-%llu] Mutex %s (%p) " \ +# define pthread_mutex_unlock(mutex) uprintf("[%d-%llu] Mutex %s (%p) " \ "unlocking at " \ "%s() line #%d\n", (int) getpid(), (unsigned long long) \ pthread_self(), #mutex, mutex, __FUNCTION__, __LINE__), \ fflush(stdout), \ pthread_mutex_unlock(mutex) +# define pthread_mutex_trylock(mutex) uprintf("[%d-%llu] Mutex %s (%p) " \ + "trylocking at " \ + "%s() line #%d\n", (int) getpid(), (unsigned long long) \ + pthread_self(), #mutex, mutex, __FUNCTION__, __LINE__), \ + fflush(stdout), \ + pthread_mutex_trylock(mutex) #endif @@ -1005,6 +1020,8 @@ pid_t debug_fork(); # define d_ex_chiffrement_indisponible __erreur(90) # define d_ex_longueur_clef_chiffrement __erreur(91) # define d_ex_taille_message __erreur(92) +# define d_ex_type_externe_dup __erreur(93) +# define d_ex_type_externe_drop __erreur(94) #endif @@ -1033,6 +1050,7 @@ pid_t debug_fork(); #define BIN __RPL_BIN #define CHN __RPL_CHN #define CPL __RPL_CPL +#define EXT __RPL_EXT #define FCH __RPL_FCH #define FCT __RPL_FCT #define INT __RPL_INT @@ -1058,7 +1076,7 @@ pid_t debug_fork(); enum t_rplcas_commandes { RPLCAS_INTEGRATION = 0, RPLCAS_LIMITE }; -enum t_type { ADR = 0, ALG, BIN, CHN, CPL, FCH, FCT, INT, LST, +enum t_type { ADR = 0, ALG, BIN, CHN, CPL, EXT, FCH, FCT, INT, LST, MCX, MIN, MRL, MTX, NOM, NON, PRC, REC, REL, RPN, SCK, SLB, SPH, SQL, TBL, VCX, VIN, VRL }; @@ -1082,6 +1100,8 @@ enum t_type { ADR = 0, ALG, BIN, CHN, C Sans objet. Type C/Fortran : complex16 + EXT : type géré dans une bibliothèque externe. + FCH : descripteur de fichier (struct_fichier *). FCT : déclaration d'une fonction et de son nombre d'arguments @@ -1147,6 +1167,8 @@ enum t_type { ADR = 0, ALG, BIN, CHN, C typedef struct objet { enum t_type type; + integer8 extension_type; + void *descripteur_bibliotheque; volatile long nombre_occurrences; @@ -1763,6 +1785,7 @@ typedef struct instruction_externe unsigned char *nom; unsigned char *nom_bibliotheque; void *descripteur_bibliotheque; + integer8 position_fleche; } struct_instruction_externe; @@ -2468,8 +2491,8 @@ typedef struct processus variables_tableau_noeuds_partages) CACHE2(struct_buffer, enveloppes_buffers) - unsigned char ***cache_buffer; - int *pointeur_cache_buffer; + unsigned char ***cache_buffer; + int *pointeur_cache_buffer; } struct_processus; #endif @@ -3149,7 +3172,10 @@ void interruption3(int signal); void interruption4(int signal); void interruption5(int signal); void interruption6(int signal); -void interruption_depassement_pile(int urgence, stackoverflow_context_t scp); +#ifdef HAVE_SIGSEGV_RECOVERY + void interruption_depassement_pile(int urgence, + stackoverflow_context_t scp); +#endif void inversion_matrice(struct_processus *s_etat_processus, struct_matrice *s_matrice); void lancement_daemon(struct_processus *s_etat_processus); @@ -3428,7 +3454,8 @@ logical1 retrait_variable_statique(struc logical1 retrait_variables_statiques_locales( struct_processus *s_etat_processus); logical1 sequenceur(struct_processus *s_etat_processus); -logical1 sequenceur_optimise(struct_processus *s_etat_processus); +logical1 sequenceur_optimise(struct_processus *s_etat_processus, + struct_liste_chainee *l_bibliotheques); #endif /*