<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Error compiling C program on HP-UX in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/error-compiling-c-program-on-hp-ux/m-p/2974630#M720406</link>
    <description>I am trying to compile (i.e., #cc makebar.c) a program on an HP-UX 11.0 server, using "cc".  I am getting the following error,&lt;BR /&gt;&lt;BR /&gt;{cc: "makebar.c", line 427: error 1584: Inconsistent type declaration: "round" }&lt;BR /&gt;&lt;BR /&gt;code at and around line 427&lt;BR /&gt;&lt;BR /&gt;427: int round( d )&lt;BR /&gt;428: double d;&lt;BR /&gt;429:&lt;BR /&gt;430:{&lt;BR /&gt;431:    double z;&lt;BR /&gt;432:    int i;&lt;BR /&gt;433:&lt;BR /&gt;434:    i = z = floor( d );&lt;BR /&gt;435:    if ( d - z &amp;gt;= .5 )&lt;BR /&gt;436:        ++i;&lt;BR /&gt;437:    return i;&lt;BR /&gt;438: }&lt;BR /&gt;&lt;BR /&gt;Is there something wrong with the above code?  I noticed while searching on the error message several years back it stated to installed a cumlative patch for the C compiler.  Might this imply here?&lt;BR /&gt;&lt;BR /&gt;Thank you in advance for any help.&lt;BR /&gt;</description>
    <pubDate>Thu, 15 May 2003 18:54:13 GMT</pubDate>
    <dc:creator>Randy Carey</dc:creator>
    <dc:date>2003-05-15T18:54:13Z</dc:date>
    <item>
      <title>Error compiling C program on HP-UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-compiling-c-program-on-hp-ux/m-p/2974630#M720406</link>
      <description>I am trying to compile (i.e., #cc makebar.c) a program on an HP-UX 11.0 server, using "cc".  I am getting the following error,&lt;BR /&gt;&lt;BR /&gt;{cc: "makebar.c", line 427: error 1584: Inconsistent type declaration: "round" }&lt;BR /&gt;&lt;BR /&gt;code at and around line 427&lt;BR /&gt;&lt;BR /&gt;427: int round( d )&lt;BR /&gt;428: double d;&lt;BR /&gt;429:&lt;BR /&gt;430:{&lt;BR /&gt;431:    double z;&lt;BR /&gt;432:    int i;&lt;BR /&gt;433:&lt;BR /&gt;434:    i = z = floor( d );&lt;BR /&gt;435:    if ( d - z &amp;gt;= .5 )&lt;BR /&gt;436:        ++i;&lt;BR /&gt;437:    return i;&lt;BR /&gt;438: }&lt;BR /&gt;&lt;BR /&gt;Is there something wrong with the above code?  I noticed while searching on the error message several years back it stated to installed a cumlative patch for the C compiler.  Might this imply here?&lt;BR /&gt;&lt;BR /&gt;Thank you in advance for any help.&lt;BR /&gt;</description>
      <pubDate>Thu, 15 May 2003 18:54:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-compiling-c-program-on-hp-ux/m-p/2974630#M720406</guid>
      <dc:creator>Randy Carey</dc:creator>
      <dc:date>2003-05-15T18:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: Error compiling C program on HP-UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-compiling-c-program-on-hp-ux/m-p/2974631#M720407</link>
      <description>round () most likely already exixsts as a libc or libm function. You can overrule it like this but I would strongly advise against it and choose a different name. Why not use myround ()?.&lt;BR /&gt;&lt;BR /&gt;Enjoy, have FUN! H.Merijn</description>
      <pubDate>Thu, 15 May 2003 19:03:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-compiling-c-program-on-hp-ux/m-p/2974631#M720407</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2003-05-15T19:03:10Z</dc:date>
    </item>
    <item>
      <title>Re: Error compiling C program on HP-UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-compiling-c-program-on-hp-ux/m-p/2974632#M720408</link>
      <description>Actually, the code as posted (at least as well as my eyeball compiler works) will compile; the problem occurs when you incude those pesky header files that you didn't post. There is a standard lm function round that is a double rather than int and that is what is causing your problem. You must be using &lt;MATH.H&gt; because otherwise floor would be returning an int rather than double value.&lt;BR /&gt;&lt;BR /&gt;In any event this is not very pretty (or safe) code. You might consider using the rint() function.&lt;BR /&gt;&lt;/MATH.H&gt;</description>
      <pubDate>Thu, 15 May 2003 19:06:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-compiling-c-program-on-hp-ux/m-p/2974632#M720408</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2003-05-15T19:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: Error compiling C program on HP-UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-compiling-c-program-on-hp-ux/m-p/2974633#M720409</link>
      <description>Inconsistent type declaration error occurs when the prototype you have declared in some file (header or c file) doesnt match with the function defintion (signature).&lt;BR /&gt;&lt;BR /&gt;Double check that.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;Umapathy</description>
      <pubDate>Thu, 15 May 2003 19:07:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-compiling-c-program-on-hp-ux/m-p/2974633#M720409</guid>
      <dc:creator>Umapathy S</dc:creator>
      <dc:date>2003-05-15T19:07:54Z</dc:date>
    </item>
  </channel>
</rss>

