Changeset 9ad1f13 in rtems


Ignore:
Timestamp:
Jan 21, 1998, 6:28:09 PM (23 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
ba024755
Parents:
d73ed76b
Message:

Added autoconf support for strerror/sys_errlist per Ralf Corsepius'
direction. This fixes a problem reported by Steve Evans of Radstone
since he is using glibc2.

Files:
20 edited

Legend:

Unmodified
Added
Removed
  • c/build-tools/cklength.c

    rd73ed76b r9ad1f13  
    3636#include <stdarg.h>
    3737
     38#include "config.h"
     39
     40#ifndef VMS
     41#ifndef HAVE_STRERROR
     42extern int sys_nerr;
     43extern char *sys_errlist[];
     44
     45#define strerror( _err ) \
     46  ((_err) < sys_nerr) ? sys_errlist [(_err)] : "unknown error"
     47
     48#else   /* HAVE_STRERROR */
     49char *strerror ();
     50#endif
     51#else   /* VMS */
     52char *strerror (int,...);
     53#endif
     54
     55
    3856#define BUFFER_SIZE     512
    3957
     
    232250    va_list arglist;
    233251    register char *format;
    234     extern char *sys_errlist[];
    235     extern int sys_nerr;
    236252    int local_errno;
    237253
     
    251267
    252268    if (local_errno)
    253         if ((local_errno > 0) && (local_errno < sys_nerr))
    254             (void) fprintf(stderr, " (%s)\n", sys_errlist[local_errno]);
    255         else
    256             (void) fprintf(stderr, " (unknown errno=%d)\n", local_errno);
    257     else
    258         (void) fprintf(stderr, "\n");
     269      (void) fprintf(stderr, " (%s)\n", strerror(local_errno));
    259270
    260271    (void) fflush(stderr);
  • c/build-tools/eolstrip.c

    rd73ed76b r9ad1f13  
    3131#include <stdarg.h>
    3232
     33#include "config.h"
     34
     35#ifndef VMS
     36#ifndef HAVE_STRERROR
     37extern int sys_nerr;
     38extern char *sys_errlist[];
     39
     40#define strerror( _err ) \
     41  ((_err) < sys_nerr) ? sys_errlist [(_err)] : "unknown error"
     42
     43#else   /* HAVE_STRERROR */
     44char *strerror ();
     45#endif
     46#else   /* VMS */
     47char *strerror (int,...);
     48#endif
     49
     50
    3351#define BUFFER_SIZE     2048
    3452#define MAX_PATH        2048
     
    219237    va_list arglist;
    220238    register char *format;
    221     extern char *sys_errlist[];
    222     extern int sys_nerr;
    223239    int local_errno;
    224240
     
    238254
    239255    if (local_errno)
    240         if ((local_errno > 0) && (local_errno < sys_nerr))
    241             (void) fprintf(stderr, " (%s)\n", sys_errlist[local_errno]);
    242         else
    243             (void) fprintf(stderr, " (unknown errno=%d)\n", local_errno);
     256      (void) fprintf(stderr, " (%s)\n", strerror(local_errno));
    244257    else
    245         (void) fprintf(stderr, "\n");
     258      (void) fprintf(stderr, "\n");
    246259
    247260    (void) fflush(stderr);
  • c/build-tools/packhex.c

    rd73ed76b r9ad1f13  
    3737#include <stdlib.h>
    3838#include <string.h>
     39
     40#include "config.h"
     41
     42#ifndef VMS
     43#ifndef HAVE_STRERROR
     44extern int sys_nerr;
     45extern char *sys_errlist[];
     46
     47#define strerror( _err ) \
     48  ((_err) < sys_nerr) ? sys_errlist [(_err)] : "unknown error"
     49
     50#else   /* HAVE_STRERROR */
     51char *strerror ();
     52#endif
     53#else   /* VMS */
     54char *strerror (int,...);
     55#endif
    3956
    4057#if defined(__unix__) && !defined(EXIT_FAILURE)
  • c/build-tools/src/Makefile.in

    rd73ed76b r9ad1f13  
    4141
    4242DEFINES  +=
    43 CPPFLAGS +=
     43CPPFLAGS += -I.
    4444CFLAGS   +=
    4545
  • c/build-tools/src/cklength.c

    rd73ed76b r9ad1f13  
    3636#include <stdarg.h>
    3737
     38#include "config.h"
     39
     40#ifndef VMS
     41#ifndef HAVE_STRERROR
     42extern int sys_nerr;
     43extern char *sys_errlist[];
     44
     45#define strerror( _err ) \
     46  ((_err) < sys_nerr) ? sys_errlist [(_err)] : "unknown error"
     47
     48#else   /* HAVE_STRERROR */
     49char *strerror ();
     50#endif
     51#else   /* VMS */
     52char *strerror (int,...);
     53#endif
     54
     55
    3856#define BUFFER_SIZE     512
    3957
     
    232250    va_list arglist;
    233251    register char *format;
    234     extern char *sys_errlist[];
    235     extern int sys_nerr;
    236252    int local_errno;
    237253
     
    251267
    252268    if (local_errno)
    253         if ((local_errno > 0) && (local_errno < sys_nerr))
    254             (void) fprintf(stderr, " (%s)\n", sys_errlist[local_errno]);
    255         else
    256             (void) fprintf(stderr, " (unknown errno=%d)\n", local_errno);
    257     else
    258         (void) fprintf(stderr, "\n");
     269      (void) fprintf(stderr, " (%s)\n", strerror(local_errno));
    259270
    260271    (void) fflush(stderr);
  • c/build-tools/src/eolstrip.c

    rd73ed76b r9ad1f13  
    3131#include <stdarg.h>
    3232
     33#include "config.h"
     34
     35#ifndef VMS
     36#ifndef HAVE_STRERROR
     37extern int sys_nerr;
     38extern char *sys_errlist[];
     39
     40#define strerror( _err ) \
     41  ((_err) < sys_nerr) ? sys_errlist [(_err)] : "unknown error"
     42
     43#else   /* HAVE_STRERROR */
     44char *strerror ();
     45#endif
     46#else   /* VMS */
     47char *strerror (int,...);
     48#endif
     49
     50
    3351#define BUFFER_SIZE     2048
    3452#define MAX_PATH        2048
     
    219237    va_list arglist;
    220238    register char *format;
    221     extern char *sys_errlist[];
    222     extern int sys_nerr;
    223239    int local_errno;
    224240
     
    238254
    239255    if (local_errno)
    240         if ((local_errno > 0) && (local_errno < sys_nerr))
    241             (void) fprintf(stderr, " (%s)\n", sys_errlist[local_errno]);
    242         else
    243             (void) fprintf(stderr, " (unknown errno=%d)\n", local_errno);
     256      (void) fprintf(stderr, " (%s)\n", strerror(local_errno));
    244257    else
    245         (void) fprintf(stderr, "\n");
     258      (void) fprintf(stderr, "\n");
    246259
    247260    (void) fflush(stderr);
  • c/build-tools/src/packhex.c

    rd73ed76b r9ad1f13  
    3737#include <stdlib.h>
    3838#include <string.h>
     39
     40#include "config.h"
     41
     42#ifndef VMS
     43#ifndef HAVE_STRERROR
     44extern int sys_nerr;
     45extern char *sys_errlist[];
     46
     47#define strerror( _err ) \
     48  ((_err) < sys_nerr) ? sys_errlist [(_err)] : "unknown error"
     49
     50#else   /* HAVE_STRERROR */
     51char *strerror ();
     52#endif
     53#else   /* VMS */
     54char *strerror (int,...);
     55#endif
    3956
    4057#if defined(__unix__) && !defined(EXIT_FAILURE)
  • c/build-tools/src/unhex.c

    rd73ed76b r9ad1f13  
    3939#include <stdarg.h>
    4040
     41#include "config.h"
     42
     43#ifndef VMS
     44#ifndef HAVE_STRERROR
     45extern int sys_nerr;
     46extern char *sys_errlist[];
     47
     48#define strerror( _err ) \
     49  ((_err) < sys_nerr) ? sys_errlist [(_err)] : "unknown error"
     50
     51#else   /* HAVE_STRERROR */
     52char *strerror ();
     53#endif
     54#else   /* VMS */
     55char *strerror (int,...);
     56#endif
     57
     58
    4159#define OK      0
    4260#define FAILURE (-1)
     
    120138char *MISTYPE = "Incompatible record types";
    121139
    122 int
    123 main(argc, argv)
    124 int argc;
    125 char **argv;
     140int main(
     141  int argc,
     142  char **argv
     143)
    126144{
    127145    register int c;
     
    681699    va_list arglist;
    682700    register char *format;
    683     extern char *sys_errlist[];
    684     extern int sys_nerr;
    685701    int local_errno;
    686702
     
    700716
    701717    if (local_errno)
    702         if ((local_errno > 0) && (local_errno < sys_nerr))
    703             (void) fprintf(stderr, " (%s)\n", sys_errlist[local_errno]);
    704         else
    705             (void) fprintf(stderr, " (unknown errno=%d)\n", local_errno);
     718      (void) fprintf(stderr, " (%s)\n", strerror(local_errno));
    706719    else
    707         (void) fprintf(stderr, "\n");
     720      (void) fprintf(stderr, "\n");
    708721
    709722    (void) fflush(stderr);
  • c/build-tools/unhex.c

    rd73ed76b r9ad1f13  
    3939#include <stdarg.h>
    4040
     41#include "config.h"
     42
     43#ifndef VMS
     44#ifndef HAVE_STRERROR
     45extern int sys_nerr;
     46extern char *sys_errlist[];
     47
     48#define strerror( _err ) \
     49  ((_err) < sys_nerr) ? sys_errlist [(_err)] : "unknown error"
     50
     51#else   /* HAVE_STRERROR */
     52char *strerror ();
     53#endif
     54#else   /* VMS */
     55char *strerror (int,...);
     56#endif
     57
     58
    4159#define OK      0
    4260#define FAILURE (-1)
     
    120138char *MISTYPE = "Incompatible record types";
    121139
    122 int
    123 main(argc, argv)
    124 int argc;
    125 char **argv;
     140int main(
     141  int argc,
     142  char **argv
     143)
    126144{
    127145    register int c;
     
    681699    va_list arglist;
    682700    register char *format;
    683     extern char *sys_errlist[];
    684     extern int sys_nerr;
    685701    int local_errno;
    686702
     
    700716
    701717    if (local_errno)
    702         if ((local_errno > 0) && (local_errno < sys_nerr))
    703             (void) fprintf(stderr, " (%s)\n", sys_errlist[local_errno]);
    704         else
    705             (void) fprintf(stderr, " (unknown errno=%d)\n", local_errno);
     718      (void) fprintf(stderr, " (%s)\n", strerror(local_errno));
    706719    else
    707         (void) fprintf(stderr, "\n");
     720      (void) fprintf(stderr, "\n");
    708721
    709722    (void) fflush(stderr);
  • configure

    rd73ed76b r9ad1f13  
    10291029fi
    10301030
     1031for ac_func in strerror
     1032do
     1033echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
     1034echo "configure:1035: checking for $ac_func" >&5
     1035if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
     1036  echo $ac_n "(cached) $ac_c" 1>&6
     1037else
     1038  cat > conftest.$ac_ext <<EOF
     1039#line 1040 "configure"
     1040#include "confdefs.h"
     1041/* System header to define __stub macros and hopefully few prototypes,
     1042    which can conflict with char $ac_func(); below.  */
     1043#include <assert.h>
     1044/* Override any gcc2 internal prototype to avoid an error.  */
     1045/* We use char because int might match the return type of a gcc2
     1046    builtin and then its argument prototype would still apply.  */
     1047char $ac_func();
     1048
     1049int main() {
     1050
     1051/* The GNU C library defines this for functions which it implements
     1052    to always fail with ENOSYS.  Some functions are actually named
     1053    something starting with __ and the normal name is an alias.  */
     1054#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
     1055choke me
     1056#else
     1057$ac_func();
     1058#endif
     1059
     1060; return 0; }
     1061EOF
     1062if { (eval echo configure:1063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
     1063  rm -rf conftest*
     1064  eval "ac_cv_func_$ac_func=yes"
     1065else
     1066  echo "configure: failed program was:" >&5
     1067  cat conftest.$ac_ext >&5
     1068  rm -rf conftest*
     1069  eval "ac_cv_func_$ac_func=no"
     1070fi
     1071rm -f conftest*
     1072fi
     1073
     1074if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
     1075  echo "$ac_t""yes" 1>&6
     1076    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
     1077  cat >> confdefs.h <<EOF
     1078#define $ac_tr_func 1
     1079EOF
     1080 
     1081else
     1082  echo "$ac_t""no" 1>&6
     1083fi
     1084done
     1085
    10311086
    10321087# Extract the first word of "mkdir", so it can be a program name with args.
    10331088set dummy mkdir; ac_word=$2
    10341089echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1035 echo "configure:1036: checking for $ac_word" >&5
     1090echo "configure:1091: checking for $ac_word" >&5
    10361091if eval "test \"`echo '$''{'ac_cv_path_MKDIR'+set}'`\" = set"; then
    10371092  echo $ac_n "(cached) $ac_c" 1>&6
     
    10651120
    10661121echo $ac_n "checking for working $MKDIR -m 0755""... $ac_c" 1>&6
    1067 echo "configure:1068: checking for working $MKDIR -m 0755" >&5
     1122echo "configure:1123: checking for working $MKDIR -m 0755" >&5
    10681123if eval "test \"`echo '$''{'rtems_cv_prog_MKDIR_P'+set}'`\" = set"; then
    10691124  echo $ac_n "(cached) $ac_c" 1>&6
     
    10821137
    10831138echo $ac_n "checking for working $MKDIR -p""... $ac_c" 1>&6
    1084 echo "configure:1085: checking for working $MKDIR -p" >&5
     1139echo "configure:1140: checking for working $MKDIR -p" >&5
    10851140if eval "test \"`echo '$''{'rtems_cv_prog_mkdir_p'+set}'`\" = set"; then
    10861141  echo $ac_n "(cached) $ac_c" 1>&6
     
    11021157set dummy touch; ac_word=$2
    11031158echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1104 echo "configure:1105: checking for $ac_word" >&5
     1159echo "configure:1160: checking for $ac_word" >&5
    11051160if eval "test \"`echo '$''{'ac_cv_path_TOUCH'+set}'`\" = set"; then
    11061161  echo $ac_n "(cached) $ac_c" 1>&6
     
    11331188set dummy cmp; ac_word=$2
    11341189echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1135 echo "configure:1136: checking for $ac_word" >&5
     1190echo "configure:1191: checking for $ac_word" >&5
    11361191if eval "test \"`echo '$''{'ac_cv_path_CMP'+set}'`\" = set"; then
    11371192  echo $ac_n "(cached) $ac_c" 1>&6
     
    11651220set dummy sed; ac_word=$2
    11661221echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1167 echo "configure:1168: checking for $ac_word" >&5
     1222echo "configure:1223: checking for $ac_word" >&5
    11681223if eval "test \"`echo '$''{'ac_cv_path_SED'+set}'`\" = set"; then
    11691224  echo $ac_n "(cached) $ac_c" 1>&6
     
    11981253set dummy $ac_prog; ac_word=$2
    11991254echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1200 echo "configure:1201: checking for $ac_word" >&5
     1255echo "configure:1256: checking for $ac_word" >&5
    12011256if eval "test \"`echo '$''{'ac_cv_path_M4'+set}'`\" = set"; then
    12021257  echo $ac_n "(cached) $ac_c" 1>&6
     
    12351290set dummy $ac_prog; ac_word=$2
    12361291echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1237 echo "configure:1238: checking for $ac_word" >&5
     1292echo "configure:1293: checking for $ac_word" >&5
    12381293if eval "test \"`echo '$''{'ac_cv_path_KSH'+set}'`\" = set"; then
    12391294  echo $ac_n "(cached) $ac_c" 1>&6
     
    13121367  *)
    13131368        echo $ac_n "checking rtems target cpu""... $ac_c" 1>&6
    1314 echo "configure:1315: checking rtems target cpu" >&5
     1369echo "configure:1370: checking rtems target cpu" >&5
    13151370target_cpu=`echo $target | sed 's%^\([^-]*\)-\(.*\)$%\1%'`
    13161371echo "$ac_t""$target_cpu" 1>&6
     
    13311386# Is this a supported CPU?
    13321387echo $ac_n "checking if cpu $target_cpu is supported""... $ac_c" 1>&6
    1333 echo "configure:1334: checking if cpu $target_cpu is supported" >&5
     1388echo "configure:1389: checking if cpu $target_cpu is supported" >&5
    13341389if test -d "$srcdir/c/src/exec/score/cpu/$target_cpu"; then
    13351390  echo "$ac_t""yes" 1>&6
     
    13421397
    13431398echo $ac_n "checking for Makefile.in in c/src/exec/score/tools/$target_cpu""... $ac_c" 1>&6
    1344 echo "configure:1345: checking for Makefile.in in c/src/exec/score/tools/$target_cpu" >&5
     1399echo "configure:1400: checking for Makefile.in in c/src/exec/score/tools/$target_cpu" >&5
    13451400if test -d $srcdir/c/src/exec/score/tools/$target_cpu; then
    13461401  rtems_av_save_dir=`pwd`;
     
    13571412
    13581413echo $ac_n "checking for Makefile.in in c/src/exec/rtems""... $ac_c" 1>&6
    1359 echo "configure:1360: checking for Makefile.in in c/src/exec/rtems" >&5
     1414echo "configure:1415: checking for Makefile.in in c/src/exec/rtems" >&5
    13601415if test -d $srcdir/c/src/exec/rtems; then
    13611416  rtems_av_save_dir=`pwd`;
     
    13721427
    13731428echo $ac_n "checking for Makefile.in in c/src/exec/sapi""... $ac_c" 1>&6
    1374 echo "configure:1375: checking for Makefile.in in c/src/exec/sapi" >&5
     1429echo "configure:1430: checking for Makefile.in in c/src/exec/sapi" >&5
    13751430if test -d $srcdir/c/src/exec/sapi; then
    13761431  rtems_av_save_dir=`pwd`;
     
    13891444 
    13901445echo $ac_n "checking for Makefile.in in c/src/exec/posix""... $ac_c" 1>&6
    1391 echo "configure:1392: checking for Makefile.in in c/src/exec/posix" >&5
     1446echo "configure:1447: checking for Makefile.in in c/src/exec/posix" >&5
    13921447if test -d $srcdir/c/src/exec/posix; then
    13931448  rtems_av_save_dir=`pwd`;
     
    14111466  if test -z "$rtems_bsp"; then
    14121467    echo $ac_n "checking for bsps""... $ac_c" 1>&6
    1413 echo "configure:1414: checking for bsps" >&5
     1468echo "configure:1469: checking for bsps" >&5
    14141469    files=`ls $srcdir/c/src/lib/libbsp/$target_cpu`
    14151470    for file in $files; do
     
    14581513       
    14591514echo $ac_n "checking for Makefile.in in c/src/lib/libbsp/$target_cpu/$bspdir""... $ac_c" 1>&6
    1460 echo "configure:1461: checking for Makefile.in in c/src/lib/libbsp/$target_cpu/$bspdir" >&5
     1515echo "configure:1516: checking for Makefile.in in c/src/lib/libbsp/$target_cpu/$bspdir" >&5
    14611516if test -d $srcdir/c/src/lib/libbsp/$target_cpu/$bspdir; then
    14621517  rtems_av_save_dir=`pwd`;
     
    14811536
    14821537echo $ac_n "checking for Makefile.in in c/src/lib/libcpu/$target_cpu""... $ac_c" 1>&6
    1483 echo "configure:1484: checking for Makefile.in in c/src/lib/libcpu/$target_cpu" >&5
     1538echo "configure:1539: checking for Makefile.in in c/src/lib/libcpu/$target_cpu" >&5
    14841539if test -d $srcdir/c/src/lib/libcpu/$target_cpu; then
    14851540  rtems_av_save_dir=`pwd`;
     
    14981553 
    14991554echo $ac_n "checking for Makefile.in in c/src/lib/start/$target_cpu""... $ac_c" 1>&6
    1500 echo "configure:1501: checking for Makefile.in in c/src/lib/start/$target_cpu" >&5
     1555echo "configure:1556: checking for Makefile.in in c/src/lib/start/$target_cpu" >&5
    15011556if test -d $srcdir/c/src/lib/start/$target_cpu; then
    15021557  rtems_av_save_dir=`pwd`;
     
    15551610# If the tests are enabled, then find all the test suite Makefiles
    15561611echo $ac_n "checking Are the test suites enabled? ""... $ac_c" 1>&6
    1557 echo "configure:1558: checking Are the test suites enabled? " >&5
     1612echo "configure:1613: checking Are the test suites enabled? " >&5
    15581613tests_enabled=yes
    15591614# Check whether --enable-tests or --disable-tests was given.
     
    15751630   
    15761631echo $ac_n "checking for Makefile.in in c/src/tests/tools/$target_cpu""... $ac_c" 1>&6
    1577 echo "configure:1578: checking for Makefile.in in c/src/tests/tools/$target_cpu" >&5
     1632echo "configure:1633: checking for Makefile.in in c/src/tests/tools/$target_cpu" >&5
    15781633if test -d $srcdir/c/src/tests/tools/$target_cpu; then
    15791634  rtems_av_save_dir=`pwd`;
     
    15901645   
    15911646echo $ac_n "checking for Makefile.in in c/src/tests/libtests""... $ac_c" 1>&6
    1592 echo "configure:1593: checking for Makefile.in in c/src/tests/libtests" >&5
     1647echo "configure:1648: checking for Makefile.in in c/src/tests/libtests" >&5
    15931648if test -d $srcdir/c/src/tests/libtests; then
    15941649  rtems_av_save_dir=`pwd`;
     
    16051660   
    16061661echo $ac_n "checking for Makefile.in in c/src/tests/sptests""... $ac_c" 1>&6
    1607 echo "configure:1608: checking for Makefile.in in c/src/tests/sptests" >&5
     1662echo "configure:1663: checking for Makefile.in in c/src/tests/sptests" >&5
    16081663if test -d $srcdir/c/src/tests/sptests; then
    16091664  rtems_av_save_dir=`pwd`;
     
    16201675   
    16211676echo $ac_n "checking for Makefile.in in c/src/tests/tmtests""... $ac_c" 1>&6
    1622 echo "configure:1623: checking for Makefile.in in c/src/tests/tmtests" >&5
     1677echo "configure:1678: checking for Makefile.in in c/src/tests/tmtests" >&5
    16231678if test -d $srcdir/c/src/tests/tmtests; then
    16241679  rtems_av_save_dir=`pwd`;
     
    16351690   
    16361691echo $ac_n "checking for Makefile.in in c/src/tests/mptests""... $ac_c" 1>&6
    1637 echo "configure:1638: checking for Makefile.in in c/src/tests/mptests" >&5
     1692echo "configure:1693: checking for Makefile.in in c/src/tests/mptests" >&5
    16381693if test -d $srcdir/c/src/tests/mptests; then
    16391694  rtems_av_save_dir=`pwd`;
     
    16511706     
    16521707echo $ac_n "checking for Makefile.in in c/src/tests/psxtests""... $ac_c" 1>&6
    1653 echo "configure:1654: checking for Makefile.in in c/src/tests/psxtests" >&5
     1708echo "configure:1709: checking for Makefile.in in c/src/tests/psxtests" >&5
    16541709if test -d $srcdir/c/src/tests/psxtests; then
    16551710  rtems_av_save_dir=`pwd`;
     
    16691724# If the HWAPI is enabled, the find the HWAPI Makefiles
    16701725echo $ac_n "checking Is the HWAPI enabled? ""... $ac_c" 1>&6
    1671 echo "configure:1672: checking Is the HWAPI enabled? " >&5
     1726echo "configure:1727: checking Is the HWAPI enabled? " >&5
    16721727# Check whether --enable-hwapi or --disable-hwapi was given.
    16731728if test "${enable_hwapi+set}" = set; then
     
    16801735           
    16811736echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/analog""... $ac_c" 1>&6
    1682 echo "configure:1683: checking for Makefile.in in c/src/lib/libhwapi/analog" >&5
     1737echo "configure:1738: checking for Makefile.in in c/src/lib/libhwapi/analog" >&5
    16831738if test -d $srcdir/c/src/lib/libhwapi/analog; then
    16841739  rtems_av_save_dir=`pwd`;
     
    16951750           
    16961751echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/discrete""... $ac_c" 1>&6
    1697 echo "configure:1698: checking for Makefile.in in c/src/lib/libhwapi/discrete" >&5
     1752echo "configure:1753: checking for Makefile.in in c/src/lib/libhwapi/discrete" >&5
    16981753if test -d $srcdir/c/src/lib/libhwapi/discrete; then
    16991754  rtems_av_save_dir=`pwd`;
     
    17101765           
    17111766echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/drivers""... $ac_c" 1>&6
    1712 echo "configure:1713: checking for Makefile.in in c/src/lib/libhwapi/drivers" >&5
     1767echo "configure:1768: checking for Makefile.in in c/src/lib/libhwapi/drivers" >&5
    17131768if test -d $srcdir/c/src/lib/libhwapi/drivers; then
    17141769  rtems_av_save_dir=`pwd`;
     
    17251780           
    17261781echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/non_volatile_memory""... $ac_c" 1>&6
    1727 echo "configure:1728: checking for Makefile.in in c/src/lib/libhwapi/non_volatile_memory" >&5
     1782echo "configure:1783: checking for Makefile.in in c/src/lib/libhwapi/non_volatile_memory" >&5
    17281783if test -d $srcdir/c/src/lib/libhwapi/non_volatile_memory; then
    17291784  rtems_av_save_dir=`pwd`;
     
    17401795           
    17411796echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/serial""... $ac_c" 1>&6
    1742 echo "configure:1743: checking for Makefile.in in c/src/lib/libhwapi/serial" >&5
     1797echo "configure:1798: checking for Makefile.in in c/src/lib/libhwapi/serial" >&5
    17431798if test -d $srcdir/c/src/lib/libhwapi/serial; then
    17441799  rtems_av_save_dir=`pwd`;
     
    17551810           
    17561811echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/support""... $ac_c" 1>&6
    1757 echo "configure:1758: checking for Makefile.in in c/src/lib/libhwapi/support" >&5
     1812echo "configure:1813: checking for Makefile.in in c/src/lib/libhwapi/support" >&5
    17581813if test -d $srcdir/c/src/lib/libhwapi/support; then
    17591814  rtems_av_save_dir=`pwd`;
     
    17701825           
    17711826echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/wrapup""... $ac_c" 1>&6
    1772 echo "configure:1773: checking for Makefile.in in c/src/lib/libhwapi/wrapup" >&5
     1827echo "configure:1828: checking for Makefile.in in c/src/lib/libhwapi/wrapup" >&5
    17731828if test -d $srcdir/c/src/lib/libhwapi/wrapup; then
    17741829  rtems_av_save_dir=`pwd`;
     
    18131868
    18141869echo $ac_n "checking for Makefile.in in c/build-tools""... $ac_c" 1>&6
    1815 echo "configure:1816: checking for Makefile.in in c/build-tools" >&5
     1870echo "configure:1871: checking for Makefile.in in c/build-tools" >&5
    18161871if test -d $srcdir/c/build-tools; then
    18171872  rtems_av_save_dir=`pwd`;
     
    18281883
    18291884echo $ac_n "checking for Makefile.in in make""... $ac_c" 1>&6
    1830 echo "configure:1831: checking for Makefile.in in make" >&5
     1885echo "configure:1886: checking for Makefile.in in make" >&5
    18311886if test -d $srcdir/make; then
    18321887  rtems_av_save_dir=`pwd`;
     
    18431898
    18441899echo $ac_n "checking for Makefile.in in c/src/lib/libmisc""... $ac_c" 1>&6
    1845 echo "configure:1846: checking for Makefile.in in c/src/lib/libmisc" >&5
     1900echo "configure:1901: checking for Makefile.in in c/src/lib/libmisc" >&5
    18461901if test -d $srcdir/c/src/lib/libmisc; then
    18471902  rtems_av_save_dir=`pwd`;
     
    18581913
    18591914echo $ac_n "checking for Makefile.in in c/src/tests/samples""... $ac_c" 1>&6
    1860 echo "configure:1861: checking for Makefile.in in c/src/tests/samples" >&5
     1915echo "configure:1916: checking for Makefile.in in c/src/tests/samples" >&5
    18611916if test -d $srcdir/c/src/tests/samples; then
    18621917  rtems_av_save_dir=`pwd`;
     
    20182073make/target.cfg
    20192074make/Templates/Makefile.inc
     2075c/build-tools/src/config.h
    20202076c/update-tools/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
    20212077EOF
     
    21642220make/target.cfg
    21652221make/Templates/Makefile.inc
     2222c/build-tools/src/config.h
    21662223c/update-tools/Makefile"}
    21672224EOF
  • configure.in

    rd73ed76b r9ad1f13  
    7777AC_PATH_PROG(CHMOD,chmod)
    7878AC_PATH_PROG(SORT,sort)
     79AC_CHECK_FUNCS(strerror)
    7980
    8081dnl check mkdir behaviour, try to get mkdir -p -m 0755
     
    397398make/target.cfg
    398399make/Templates/Makefile.inc
     400c/build-tools/src/config.h
    399401c/update-tools/Makefile)
    400402
  • tools/build/cklength.c

    rd73ed76b r9ad1f13  
    3636#include <stdarg.h>
    3737
     38#include "config.h"
     39
     40#ifndef VMS
     41#ifndef HAVE_STRERROR
     42extern int sys_nerr;
     43extern char *sys_errlist[];
     44
     45#define strerror( _err ) \
     46  ((_err) < sys_nerr) ? sys_errlist [(_err)] : "unknown error"
     47
     48#else   /* HAVE_STRERROR */
     49char *strerror ();
     50#endif
     51#else   /* VMS */
     52char *strerror (int,...);
     53#endif
     54
     55
    3856#define BUFFER_SIZE     512
    3957
     
    232250    va_list arglist;
    233251    register char *format;
    234     extern char *sys_errlist[];
    235     extern int sys_nerr;
    236252    int local_errno;
    237253
     
    251267
    252268    if (local_errno)
    253         if ((local_errno > 0) && (local_errno < sys_nerr))
    254             (void) fprintf(stderr, " (%s)\n", sys_errlist[local_errno]);
    255         else
    256             (void) fprintf(stderr, " (unknown errno=%d)\n", local_errno);
    257     else
    258         (void) fprintf(stderr, "\n");
     269      (void) fprintf(stderr, " (%s)\n", strerror(local_errno));
    259270
    260271    (void) fflush(stderr);
  • tools/build/eolstrip.c

    rd73ed76b r9ad1f13  
    3131#include <stdarg.h>
    3232
     33#include "config.h"
     34
     35#ifndef VMS
     36#ifndef HAVE_STRERROR
     37extern int sys_nerr;
     38extern char *sys_errlist[];
     39
     40#define strerror( _err ) \
     41  ((_err) < sys_nerr) ? sys_errlist [(_err)] : "unknown error"
     42
     43#else   /* HAVE_STRERROR */
     44char *strerror ();
     45#endif
     46#else   /* VMS */
     47char *strerror (int,...);
     48#endif
     49
     50
    3351#define BUFFER_SIZE     2048
    3452#define MAX_PATH        2048
     
    219237    va_list arglist;
    220238    register char *format;
    221     extern char *sys_errlist[];
    222     extern int sys_nerr;
    223239    int local_errno;
    224240
     
    238254
    239255    if (local_errno)
    240         if ((local_errno > 0) && (local_errno < sys_nerr))
    241             (void) fprintf(stderr, " (%s)\n", sys_errlist[local_errno]);
    242         else
    243             (void) fprintf(stderr, " (unknown errno=%d)\n", local_errno);
     256      (void) fprintf(stderr, " (%s)\n", strerror(local_errno));
    244257    else
    245         (void) fprintf(stderr, "\n");
     258      (void) fprintf(stderr, "\n");
    246259
    247260    (void) fflush(stderr);
  • tools/build/packhex.c

    rd73ed76b r9ad1f13  
    3737#include <stdlib.h>
    3838#include <string.h>
     39
     40#include "config.h"
     41
     42#ifndef VMS
     43#ifndef HAVE_STRERROR
     44extern int sys_nerr;
     45extern char *sys_errlist[];
     46
     47#define strerror( _err ) \
     48  ((_err) < sys_nerr) ? sys_errlist [(_err)] : "unknown error"
     49
     50#else   /* HAVE_STRERROR */
     51char *strerror ();
     52#endif
     53#else   /* VMS */
     54char *strerror (int,...);
     55#endif
    3956
    4057#if defined(__unix__) && !defined(EXIT_FAILURE)
  • tools/build/src/Makefile.in

    rd73ed76b r9ad1f13  
    4141
    4242DEFINES  +=
    43 CPPFLAGS +=
     43CPPFLAGS += -I.
    4444CFLAGS   +=
    4545
  • tools/build/src/cklength.c

    rd73ed76b r9ad1f13  
    3636#include <stdarg.h>
    3737
     38#include "config.h"
     39
     40#ifndef VMS
     41#ifndef HAVE_STRERROR
     42extern int sys_nerr;
     43extern char *sys_errlist[];
     44
     45#define strerror( _err ) \
     46  ((_err) < sys_nerr) ? sys_errlist [(_err)] : "unknown error"
     47
     48#else   /* HAVE_STRERROR */
     49char *strerror ();
     50#endif
     51#else   /* VMS */
     52char *strerror (int,...);
     53#endif
     54
     55
    3856#define BUFFER_SIZE     512
    3957
     
    232250    va_list arglist;
    233251    register char *format;
    234     extern char *sys_errlist[];
    235     extern int sys_nerr;
    236252    int local_errno;
    237253
     
    251267
    252268    if (local_errno)
    253         if ((local_errno > 0) && (local_errno < sys_nerr))
    254             (void) fprintf(stderr, " (%s)\n", sys_errlist[local_errno]);
    255         else
    256             (void) fprintf(stderr, " (unknown errno=%d)\n", local_errno);
    257     else
    258         (void) fprintf(stderr, "\n");
     269      (void) fprintf(stderr, " (%s)\n", strerror(local_errno));
    259270
    260271    (void) fflush(stderr);
  • tools/build/src/eolstrip.c

    rd73ed76b r9ad1f13  
    3131#include <stdarg.h>
    3232
     33#include "config.h"
     34
     35#ifndef VMS
     36#ifndef HAVE_STRERROR
     37extern int sys_nerr;
     38extern char *sys_errlist[];
     39
     40#define strerror( _err ) \
     41  ((_err) < sys_nerr) ? sys_errlist [(_err)] : "unknown error"
     42
     43#else   /* HAVE_STRERROR */
     44char *strerror ();
     45#endif
     46#else   /* VMS */
     47char *strerror (int,...);
     48#endif
     49
     50
    3351#define BUFFER_SIZE     2048
    3452#define MAX_PATH        2048
     
    219237    va_list arglist;
    220238    register char *format;
    221     extern char *sys_errlist[];
    222     extern int sys_nerr;
    223239    int local_errno;
    224240
     
    238254
    239255    if (local_errno)
    240         if ((local_errno > 0) && (local_errno < sys_nerr))
    241             (void) fprintf(stderr, " (%s)\n", sys_errlist[local_errno]);
    242         else
    243             (void) fprintf(stderr, " (unknown errno=%d)\n", local_errno);
     256      (void) fprintf(stderr, " (%s)\n", strerror(local_errno));
    244257    else
    245         (void) fprintf(stderr, "\n");
     258      (void) fprintf(stderr, "\n");
    246259
    247260    (void) fflush(stderr);
  • tools/build/src/packhex.c

    rd73ed76b r9ad1f13  
    3737#include <stdlib.h>
    3838#include <string.h>
     39
     40#include "config.h"
     41
     42#ifndef VMS
     43#ifndef HAVE_STRERROR
     44extern int sys_nerr;
     45extern char *sys_errlist[];
     46
     47#define strerror( _err ) \
     48  ((_err) < sys_nerr) ? sys_errlist [(_err)] : "unknown error"
     49
     50#else   /* HAVE_STRERROR */
     51char *strerror ();
     52#endif
     53#else   /* VMS */
     54char *strerror (int,...);
     55#endif
    3956
    4057#if defined(__unix__) && !defined(EXIT_FAILURE)
  • tools/build/src/unhex.c

    rd73ed76b r9ad1f13  
    3939#include <stdarg.h>
    4040
     41#include "config.h"
     42
     43#ifndef VMS
     44#ifndef HAVE_STRERROR
     45extern int sys_nerr;
     46extern char *sys_errlist[];
     47
     48#define strerror( _err ) \
     49  ((_err) < sys_nerr) ? sys_errlist [(_err)] : "unknown error"
     50
     51#else   /* HAVE_STRERROR */
     52char *strerror ();
     53#endif
     54#else   /* VMS */
     55char *strerror (int,...);
     56#endif
     57
     58
    4159#define OK      0
    4260#define FAILURE (-1)
     
    120138char *MISTYPE = "Incompatible record types";
    121139
    122 int
    123 main(argc, argv)
    124 int argc;
    125 char **argv;
     140int main(
     141  int argc,
     142  char **argv
     143)
    126144{
    127145    register int c;
     
    681699    va_list arglist;
    682700    register char *format;
    683     extern char *sys_errlist[];
    684     extern int sys_nerr;
    685701    int local_errno;
    686702
     
    700716
    701717    if (local_errno)
    702         if ((local_errno > 0) && (local_errno < sys_nerr))
    703             (void) fprintf(stderr, " (%s)\n", sys_errlist[local_errno]);
    704         else
    705             (void) fprintf(stderr, " (unknown errno=%d)\n", local_errno);
     718      (void) fprintf(stderr, " (%s)\n", strerror(local_errno));
    706719    else
    707         (void) fprintf(stderr, "\n");
     720      (void) fprintf(stderr, "\n");
    708721
    709722    (void) fflush(stderr);
  • tools/build/unhex.c

    rd73ed76b r9ad1f13  
    3939#include <stdarg.h>
    4040
     41#include "config.h"
     42
     43#ifndef VMS
     44#ifndef HAVE_STRERROR
     45extern int sys_nerr;
     46extern char *sys_errlist[];
     47
     48#define strerror( _err ) \
     49  ((_err) < sys_nerr) ? sys_errlist [(_err)] : "unknown error"
     50
     51#else   /* HAVE_STRERROR */
     52char *strerror ();
     53#endif
     54#else   /* VMS */
     55char *strerror (int,...);
     56#endif
     57
     58
    4159#define OK      0
    4260#define FAILURE (-1)
     
    120138char *MISTYPE = "Incompatible record types";
    121139
    122 int
    123 main(argc, argv)
    124 int argc;
    125 char **argv;
     140int main(
     141  int argc,
     142  char **argv
     143)
    126144{
    127145    register int c;
     
    681699    va_list arglist;
    682700    register char *format;
    683     extern char *sys_errlist[];
    684     extern int sys_nerr;
    685701    int local_errno;
    686702
     
    700716
    701717    if (local_errno)
    702         if ((local_errno > 0) && (local_errno < sys_nerr))
    703             (void) fprintf(stderr, " (%s)\n", sys_errlist[local_errno]);
    704         else
    705             (void) fprintf(stderr, " (unknown errno=%d)\n", local_errno);
     718      (void) fprintf(stderr, " (%s)\n", strerror(local_errno));
    706719    else
    707         (void) fprintf(stderr, "\n");
     720      (void) fprintf(stderr, "\n");
    708721
    709722    (void) fflush(stderr);
Note: See TracChangeset for help on using the changeset viewer.