bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Compiling binutils 2.11.2 on SunOS 4.1.4


From: David Foster
Subject: Compiling binutils 2.11.2 on SunOS 4.1.4
Date: Thu, 13 Jun 2002 10:28:54 -0700 (PDT)

I had to make the following change to get binutils to
compile under SunOS 4.1.4:

diff ./binutils/unwind-ia64.c ./binutils/unwind-ia64.c.orig
48,51d47
< #if defined( __sun__ ) && !defined( __svr4__ )
<         sprintf (cp, "%sb%u", sep, i + 1);
<         cp += strlen( cp );
< #else
53d48
< #endif
74,77d68
< #if defined( __sun__ ) && !defined( __svr4__ )
<         sprintf (cp, "%sr%u", sep, i + 4);
<         cp += strlen( cp );
< #else
79d69
< #endif
99,102d88
< #if defined( __sun__ ) && !defined( __svr4__ )
<         sprintf (cp, "%sf%u", sep, (i < 4) ? (i + 2) : (i + 12));
<         cp += strlen( cp );
< #else
104d89
< #endif


This is because SysV behavior was assumed from sprintf() return value:

NAME
     printf, fprintf, sprintf - formatted output conversion

SYNOPSIS
     #include <stdio.h>

     int printf(format [ , arg... ] )
     char *format;

     int fprintf(stream, format [ , arg... ] )
     FILE *stream;
     char *format;

     char *sprintf(s, format [ , arg... ] )
     char *s, *format;

SYSTEM V SYNOPSIS
     The routines above are available as shown, except:

     int sprintf(s, format [ , arg... ] )
     char *s, *format;



  =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
   David Foster    National Center for Microscopy and Imaging Research
    Programmer/Analyst     University of California, San Diego
    address@hidden       Department of Neuroscience, Mail 0608
    (858) 534-7968         http://ncmir.ucsd.edu/
  =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

   "The reasonable man adapts himself to the world; the unreasonable one
   persists in trying to adapt the world to himself.  Therefore, all progress
   depends on the unreasonable."   -- George Bernard Shaw




reply via email to

[Prev in Thread] Current Thread [Next in Thread]