delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2013/08/06/15:22:55

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Recipient: djgpp AT delorie DOT com
Date: Tue, 06 Aug 2013 22:22:55 +0300
From: Eli Zaretskii <eliz AT gnu DOT org>
Subject: Re: _CRT0_FLAG_NULLOK
In-reply-to: <1d5d0ab5-8e24-4149-891e-62108504529b@googlegroups.com>
X-012-Sender: halo1 AT inter DOT net DOT il
To: djgpp AT delorie DOT com
Message-id: <83r4e6vd2o.fsf@gnu.org>
References: <21e77579-1a40-4442-8111-fc976fba78fc AT googlegroups DOT com> <b5o37qFldl9U1 AT mid DOT dfncis DOT de> <f24e8cd3-83ca-4386-a319-a9adb4d74c68 AT googlegroups DOT com> <3df2f50f-9543-47a7-8e40-a9be82ce5018 AT googlegroups DOT com> <87fvuvny2v DOT fsf AT uwakimon DOT sk DOT tsukuba DOT ac DOT jp> <op.w020sren0e5s1z@-> <87ehaeonbp DOT fsf AT uwakimon DOT sk DOT tsukuba DOT ac DOT jp> <op.w04oetou0e5s1z@-> <87zjt1n2v6 DOT fsf AT uwakimon DOT sk DOT tsukuba DOT ac DOT jp> <op.w08sjo1c0e5s1z@-> <8761vmn519 DOT fsf AT uwakimon DOT sk DOT tsukuba DOT ac DOT jp> <op.w1eankdn0e5s1z@-> <83txj2vlg6 DOT fsf AT gnu DOT org> <1d5d0ab5-8e24-4149-891e-62108504529b AT googlegroups DOT com>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> Date: Tue, 6 Aug 2013 11:59:45 -0700 (PDT)
> From: Georg Potthast <dosusb AT googlemail DOT com>
> 
> I did not post further messages because I understand that the djgpp developers could not be convinced to make a change here. As Rod pointed out with the links he provided this topic has been discussed already 25 years ago and no change was made yet.

This is not about DJGPP developers.  This is how C library functions
behave everywhere.  If you want your programs to run on as many
platforms as possible, you should always check for NULL pointers
before dereferencing them.  Everybody else does.

> The library I am using returns NULL instead of an empty string. So I will have to trap NULL before calling atoi() and fill the integer variable with zero then.

That is indeed the way to go, if you want your programs to be
reliable.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019