From owner-freebsd-current Fri May 24 6:33:27 2002 Delivered-To: freebsd-current@freebsd.org Received: from speechpro.com (crt-gw.infopro.spb.su [195.201.254.5]) by hub.freebsd.org (Postfix) with ESMTP id C6FAB37B401 for ; Fri, 24 May 2002 06:33:22 -0700 (PDT) Received: from igorr by sysadm.stc with local (Exim 3.36 #1) id 17BFCf-00043d-00 for freebsd-current@freebsd.org; Fri, 24 May 2002 17:33:57 +0400 Date: Fri, 24 May 2002 17:33:57 +0400 From: Igor Roboul To: freebsd-current@freebsd.org Subject: strtod & sscanf on -CURRENT? Message-ID: <20020524133357.GA15486@sysadm.stc> Reply-To: ir@hotbox.ru Mail-Followup-To: Igor Roboul , freebsd-current@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.99i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hello, I have some trouble with PostgreSQL on -CURRENT: SELECT birth_date,date_part('year',birth_date)::varchar from employee where id=132; birth_date | date_part ------------+-------------------- 1974-05-09 | 0.0<46113777160645 (1 row) This works as expected on -STABLE I have made simple test: %cat qq.c #include main(int argc,char**argv) { double a; char bb[100]; strcpy(bb,argv[1]); printf("%lf\n",strtod(bb,NULL)); sscanf(argv[1],"%lf",&a); printf("%lf\n",a); } %uname -a FreeBSD sysadm.stc 5.0-CURRENT FreeBSD 5.0-CURRENT #9: Mon May 20 17:34:23 MSD 2002 root@sysadm.stc:/opt/freebsd/obj/opt/freebsd/src/sys/SYSADM i386 %./a.out 1234.3124 1234.312400 0.124862 %uname -a FreeBSD r1.stc 4.4-STABLE FreeBSD 4.4-STABLE #0: Tue Dec 25 15:02:18 MSK 2001 root@r1.stc:/usr/obj/usr/src/sys/R1 i386 %./a.out 1234.3124 1234.312400 1234.312400 Maybe I'm wrong, but I think that sscanf on -CURRENT does not work as expected. -- Igor Roboul, System administrator at Speech Technology Center http://www.speechpro.com http://www.speechpro.ru To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message