Date: Sun, 15 Nov 2009 14:53:52 GMT From: Rene Ladan <rene@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 170641 for review Message-ID: <200911151453.nAFErq9X041564@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/chv.cgi?CH=170641 Change 170641 by rene@rene_self on 2009/11/15 14:53:01 [porters handbook/clang]: * Add missing text [1] [2] * Elaborate a bit on CC and CXX variables [1] * Mention that "int main(void)" is also valid for Clang [2] * Mention the default C standards used Submitted by: remko [1], Oliver Fromme [2] Affected files ... .. //depot/projects/docproj_nl/en_US.ISO8859-1/books/porters-handbook/book.sgml#51 edit Differences ... ==== //depot/projects/docproj_nl/en_US.ISO8859-1/books/porters-handbook/book.sgml#51 (text+ko) ==== @@ -13613,15 +13613,16 @@ <itemizedlist> <listitem> - <para>Respect <makevar>CC</makevar> and <makevar>CXX</makevar>. Do - not any of <filename>cc</filename>, <filename>c99</filename>, - <filename>gcc</filename>, <filename>c++</filename>, or - <filename>g++</filename> directly.</para> + <para>Respect the <makevar>CC</makevar> and <makevar>CXX</makevar> + variables. Do not use any of the programs <filename>cc</filename>, + <filename>c99</filename>, <filename>gcc</filename>, + <filename>c++</filename>, or <filename>g++</filename> in a port + directly.</para> </listitem> <listitem> <para>Respect <makevar>LD</makevar>, do not use - <filename>ld</filename> directly.</para> + <filename>ld</filename> in a port directly.</para> </listitem> <listitem> @@ -13632,10 +13633,11 @@ </listitem> <listitem> - <para>If there are link errors related to missing or already - defined functions, try to add <makevar>CSTD=gnu89</makevar> to - <filename>Makefile</filename>. The function vsnprintf() is - already built in.</para> + <para>Clang uses the C99 standard by default, while GCC uses the C89 + standard by default. Therefore, if there are any errors related + to missing or already defined functions, try to add + <makevar>CSTD=gnu89</makevar> to + <filename>Makefile</filename>.</para> </listitem> <listitem> @@ -13652,9 +13654,13 @@ </listitem> <listitem> - <para>The main function must be properly declared as</para> + <para>The main function must be properly declared as:</para> <programlisting>int main(int argc, char **argv)</programlisting> + + <para>or, if there are no parameters, as:</para> + + <programlisting>int main(void)</programlisting> </listitem> <listitem>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911151453.nAFErq9X041564>