Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Re: Results of port of Sept 18 port of PostgreSQL

From: The Hermit Hacker <scrappy(at)hub(dot)org>
To: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc: Robert Bruccoleri <bruc(at)pluto(dot)njcc(dot)com>, PostgreSQL-development <hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] Re: Results of port of Sept 18 port of PostgreSQL
Date: 1998-09-23 01:46:14
Message-ID: Pine.BSF.4.02.9809222234410.385-100000@thelab.hub.org (view raw or flat)
Thread:
Lists: pgsql-hackers
On Tue, 22 Sep 1998, Bruce Momjian wrote:

> > Irix doesn't have snprintf, so I'm talking about your ports. They
> > are missing %lld formats.
> 
> OK, we need our ports snprintf() to understand %lld.  Marc?

	Ack...I just borrowed what was in sendmail...are you saying that
sendmail doesn't work under Irix either? :(

	Ah, okay, just looking at the source code itself...neat, I think
:)  How does this look?  '%lld == long long', correct?

*** snprintf.c.orig     Tue Sep 22 22:41:46 1998
--- snprintf.c  Tue Sep 22 22:44:26 1998
***************
*** 126,131 ****
--- 126,132 ----
        int ch;
        long value;
        int longflag  = 0;
+       int longlongflag  = 0;
        int pointflag = 0;
        int maxwidth  = 0;
        char *strvalue;
***************
*** 167,173 ****
                                 len = va_arg( args, int );
                               goto nextch;
                       case '.': pointflag = 1; goto nextch;
!                        case 'l': longflag = 1; goto nextch;
                         case 'u': case 'U':
                                 /*fmtnum(value,base,dosign,ljust,len,zpad) */
                                 if( longflag ){
--- 168,178 ----
                                 len = va_arg( args, int );
                               goto nextch;
                       case '.': pointflag = 1; goto nextch;
!                        case 'l': if(longflag) {
!                                    longlongflag = 1; goto nextch;
!                                  } else {
!                                    longflag = 1; goto nextch;
!                                  }
                         case 'u': case 'U':
                                 /*fmtnum(value,base,dosign,ljust,len,zpad) */
                                 if( longflag ){
***************
*** 186,192 ****
--- 191,201 ----
                                 fmtnum( value, 8,0, ljust, len, zpad ); break;
                         case 'd': case 'D':
                                 if( longflag ){
+                                  if( longlongflag ) {
+                                        value = va_arg( args, long long );
+                                  } else {
                                         value = va_arg( args, long );
+                                  }
                                 } else {
                                         value = va_arg( args, int );
                                 }


In response to

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 1998-09-23 02:32:09
Subject: Re: [HACKERS] Re: Results of port of Sept 18 port of PostgreSQL
Previous:From: Bruce MomjianDate: 1998-09-23 01:43:31
Subject: Re: NOT boolfield kills backend

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group