|
Message-ID: <20190710214407.GN21055@port70.net> Date: Wed, 10 Jul 2019 23:44:07 +0200 From: Szabolcs Nagy <nsz@...t70.net> To: musl@...ts.openwall.com Subject: Re: [PATCH] Define NULL as __null in C++ mode when using GCC or Clang. * Rich Felker <dalias@...c.org> [2019-07-10 17:16:24 -0400]: > > i think modern c++ code should use nullptr in the code. > > > > definition of NULL should be imo kept as 0L (that's what > > you would get on older unix systems or on openbsd anyway) > > apparently some ppl prefer __null. > > Do you know if OpenBSD has a reason they do it this way? hm i misremembered and they changed it anyway https://github.com/openbsd/src/blob/master/sys/sys/_null.h openbsd used to define NULL as 0L for both c and c++, then they changed it to __null if __GNUG__ and 0L and (void*)0 for c++ and c, now it's even more complicated. maybe it was some other bsd or solaris that used 0L i remember looking at it last time we changed NULL.
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.