diff --git a/Config.tmpl b/Config.tmpl
index 758aed8..eb19e7f 100644
--- a/Config.tmpl
+++ b/Config.tmpl
@@ -58,3 +58,6 @@
 /* Pour viter les dpassements de capacit des buffers si l'OS le permet */
 #define HAS_SNPRINTF
 
+/* en remplacement de sys_errlist[] si possible */
+#define HAS_STRERROR
+
diff --git a/global.h b/global.h
index b600eab..6f21859 100644
--- a/global.h
+++ b/global.h
@@ -22,6 +22,11 @@
 #ifndef _global_h
 #define _global_h
 
+/*
+ * pour rcuprer la config globale du programme
+ */
+#include "Config.tmpl"
+
 #ifndef EXTERN
 #define EXTERN extern
 #endif 
@@ -203,10 +208,9 @@ char *build_name();
 /* 
  * Variables 
  */
-#ifndef __FreeBSD__
-#ifndef __GLIBC__
+#ifndef HAS_STRERROR
 extern char *sys_errlist[];
-#endif
+#define strerror(e) (sys_errlist[e])
 #endif
 
 /* xtel.c */
diff --git a/globald.h b/globald.h
index c3864c3..51477f9 100644
--- a/globald.h
+++ b/globald.h
@@ -26,6 +26,11 @@ typedef char Boolean;
 #define True	1
 #define False	0
 
+/*
+ * pour rcuprer la config globale du programme
+ */
+#include "Config.tmpl"
+
 #ifndef EXTERN
 #define EXTERN extern
 #endif
@@ -33,10 +38,9 @@ typedef char Boolean;
 /*
  * Variables
  */
-#ifndef __FreeBSD__
-#ifndef __GLIBC__
+#ifndef HAS_STRERROR
 extern char *sys_errlist[];
-#endif
+#define strerror(e) (sys_errlist[e])
 #endif
 
 EXTERN struct definition_ligne definition_lignes[MAX_LIGNES]; 
diff --git a/mdmdetect.c b/mdmdetect.c
index 5e7f512..d11e6f0 100644
--- a/mdmdetect.c
+++ b/mdmdetect.c
@@ -22,6 +22,7 @@ static char rcsid[] = "$Id: mdmdetect.c,v 1.3 2001/02/11 00:02:58 pierre Exp $";
 
 /* Detection du modem pour generation du xtel.lignes */
 
+#include "Config.tmpl"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -49,10 +50,9 @@ static char rcsid[] = "$Id: mdmdetect.c,v 1.3 2001/02/11 00:02:58 pierre Exp $";
 #define TIMEOUT_READ		5
 #define TEMPO			1000000
 
-#ifndef __FreeBSD__
-#ifndef __GLIBC__
+#ifndef HAS_STRERROR
 extern char *sys_errlist[];
+#define strerror(e) (sys_errlist[e])
-#endif
 #endif
 extern char *xtel_basename (), *next_token ();
 
diff --git b/mdmdetect.c a/mdmdetect.c
index 7055383..e9f9fd9 100644
--- b/mdmdetect.c
+++ a/mdmdetect.c
@@ -112,7 +112,7 @@ static void check_and_lock (char *line)
 #ifdef SVR4
   sprintf (buf, "/dev/%s", line);
   if (stat (buf, &statb) != 0) {
-      fprintf (stderr, "%s: %s\n", buf, sys_errlist[errno]);
+      fprintf (stderr, "%s: %s\n", buf, strerror(errno));
       the_end (1);
   }
 
@@ -160,13 +160,13 @@ static void check_and_lock (char *line)
 	      else if (errno != ENOENT) {
 		  /* il ne vient pas d'tre effac par un autre programme */
 		  /* c'est donc un vrai problme */
-		  fprintf (stderr, "%s: %s\n", lock_file, sys_errlist[errno]);
+		  fprintf (stderr, "%s: %s\n", lock_file, strerror(errno));
 		  the_end (1);
 	      }
 	  }
 	  else {
 	      /* fichier impossible  crer */
-	      fprintf (stderr, "Can't create lock file %s (%s)\n", lock_file, sys_errlist[errno]);
+	      fprintf (stderr, "Can't create lock file %s (%s)\n", lock_file, strerror(errno));
 	      the_end (1);
 	  }
       }
@@ -175,7 +175,7 @@ static void check_and_lock (char *line)
   /* Le lock est pos ; il faut y inscrire le pid de ce programme */
   sprintf (buf, "%10d\n", getpid());
   if (write (fd, buf, 11) != 11) {
-      fprintf (stderr, "Error writing to file %s (%s)\n", lock_file, sys_errlist[errno]);
+      fprintf (stderr, "Error writing to file %s (%s)\n", lock_file, strerror(errno));
       close (fd);
       the_end (1);
   }
diff --git b/modem.c a/modem.c
index 3e0e63f..8d1bc99 100644
--- b/modem.c
+++ a/modem.c
@@ -123,7 +123,7 @@ char *s;
       if (*s != '%')
 	fputc (*s, fp_console);
       else if (*(s+1) == 'm') {
-	fprintf (fp_console, "%s", sys_errlist[errno]);
+	fprintf (fp_console, "%s", strerror(errno));
 	s++;
       }
 
diff --git b/procedure.c a/procedure.c
index 4f8aedb..03550d0 100644
--- b/procedure.c
+++ a/procedure.c
@@ -241,7 +241,7 @@ int fd;
 		  fclose (fp);
 		}
 		else
-		  fprintf (stderr, "run_procedure: %s: %s\n", (current_pd->p).filename, sys_errlist[errno]);
+		  fprintf (stderr, "run_procedure: %s: %s\n", (current_pd->p).filename, strerror(errno));
 	      }
 	    break;
 
@@ -255,7 +255,7 @@ int fd;
 		  fclose (fp);
 		}
 		else
-		  fprintf (stderr, "run_procedure: %s: %s\n", (current_pd->p).filename, sys_errlist[errno]);
+		  fprintf (stderr, "run_procedure: %s: %s\n", (current_pd->p).filename, strerror(errno));
 	      }
 
 	    break;
diff --git b/teleinfo.c a/teleinfo.c
index 6f18ef8..29c8e58 100644
--- b/teleinfo.c
+++ a/teleinfo.c
@@ -87,7 +87,7 @@ int *pl, *pc;
      */
     strcpy (master, "/dev/ptmx");
     if ((fd_master = open ("/dev/ptmx", O_RDWR)) < 0)
-	teleinfo_fatal ("/dev/ptmx", sys_errlist[errno]);
+	teleinfo_fatal ("/dev/ptmx", strerror(errno));
     sighold (SIGCLD);
     if (grantpt (fd_master) == -1)
 	teleinfo_fatal ("could not grant slave pty");
@@ -157,7 +157,7 @@ char *nom;
 	teleinfo_fatal ("erreur ouverture maitre");
 
     if ((fd_teleinfo = open (pty_s, O_RDWR)) < 0)
-	teleinfo_fatal (pty_s, sys_errlist[errno]);
+	teleinfo_fatal (pty_s, strerror(errno));
 
     /* Configuration de la ligne (mode RAW) */
 #ifdef SVR4    
diff --git b/xaw.c a/xaw.c
index b37f7e6..518c136 100644
--- b/xaw.c
+++ a/xaw.c
@@ -1270,7 +1270,7 @@ int code_erreur;
 	hand_cursor = XCreateFontCursor (XtDisplay(top), XC_hand2);
 
     if (code_erreur != 0)
-	sprintf (buf, "%s : %s", s, sys_errlist[code_erreur]);
+	sprintf (buf, "%s : %s", s, strerror(code_erreur));
     else {
       if (s[0] == '[')
 	strcpy (buf, rsc_xtel.erreur[s[1]-'0']);
diff --git b/xm.c a/xm.c
index 096dc1b..dbb6c43 100644
--- b/xm.c
+++ a/xm.c
@@ -868,7 +868,7 @@ char *s;
 int code_erreur;
 {
     if (code_erreur != 0)
-	sprintf (buf, "%s : %s", s, sys_errlist[code_erreur]);
+	sprintf (buf, "%s : %s", s, strerror(code_erreur));
     else {
       if (s[0] == '[')
 	strcpy (buf, rsc_xtel.erreur[s[1]-'0']);
diff --git b/xteld.c a/xteld.c
index f55599c..2732d4e 100644
--- b/xteld.c
+++ a/xteld.c
@@ -277,7 +277,7 @@ int code_erreur;
     }
     else if (type_client == CLIENT_W_HYPER) {
       if (e)
-	sprintf (buf, "%s: %s", s, sys_errlist[errno]);
+	sprintf (buf, "%s: %s", s, strerror(errno));
       else {
 	if (*s == '[')
 	  strcpy (buf, s + 3);
