Changeset 1099


Ignore:
Timestamp:
Jan 29, 2004, 5:18:35 AM (22 years ago)
Author:
bird
Message:

Changed error to error as GLIBC does.

Location:
trunk/src/emx/src/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/src/lib/lgpl/misc/error.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r1098 r1099  
    2626
    2727#include <stdio.h>
     28#ifndef __EMX__                         /* bird */
    2829#include <libintl.h>
     30#endif                                  /* bird */
    2931#ifdef _LIBC
    3032# include <wchar.h>
     
    7274#ifdef _LIBC
    7375/* In the GNU C library, there is a predefined variable for this.  */
    74 
    7576# define program_name program_invocation_name
    7677# include <errno.h>
     
    8485                             unsigned int line_number, const char *message,
    8586                             ...)
    86      __attribute__ ((__format__ (__printf__, 5, 6)));;
     87     __attribute__ ((__format__ (__printf__, 5, 6)));
    8788# define error __error
    8889# define error_at_line __error_at_line
     
    102103# endif
    103104
    104 #ifndef __EMX__
     105#ifndef __EMX__                         /* bird */
    105106/* The calling program should define program_name and set it to the
    106107   name of the executing program.  */
    107108extern char *program_name;
    108 #else
     109#else                                   /* bird */
    109110/* Use the BSD _getprogname() which the Innotek LIBC also implements.
    110111   Using this save the time used to maintain the two program_* vars
     
    112113extern const char *_getprogname(void);
    113114#define program_name    _getprogname()
    114 #endif
     115
     116/* In GNU libc we want do not want to use the common name `error' directly.
     117   Instead make it a weak alias.  */
     118extern void __error (int status, int errnum, const char *message, ...)
     119     __attribute__ ((__format__ (__printf__, 3, 4)));
     120extern void __error_at_line (int status, int errnum, const char *file_name,
     121                             unsigned int line_number, const char *message,
     122                             ...)
     123     __attribute__ ((__format__ (__printf__, 5, 6)));
     124# define error __error
     125# define error_at_line __error_at_line
     126
     127#endif                                  /* bird */
    115128
    116129# if HAVE_STRERROR_R || defined strerror_r
  • trunk/src/emx/src/lib/libc.def

    • Property cvs2svn:cvs-rev changed from 1.45 to 1.46
    r1098 r1099  
    991991    "___spawni" @1018
    992992    "_strsignal" @1019
    993     "_error" @1020
    994     "_error_at_line" @1021
     993    "___error" @1020
     994    "___error_at_line" @1021
    995995    "_sys_nsig" @1022
    996996    "_sys_siglist" @1023
Note: See TracChangeset for help on using the changeset viewer.