<?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 32bit and 64 bit pro*c  program in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/32bit-and-64-bit-pro-c-program/m-p/4857948#M866802</link>
    <description>i compiled bellow pro*c sample by using 32bit compiler but 64 bit compiler i am getting errors.My os is AIX ver 5.2.&lt;BR /&gt;&lt;BR /&gt;#include &lt;TIME.H&gt;&lt;BR /&gt;#include&lt;STRING.H&gt;&lt;BR /&gt;int main()&lt;BR /&gt;{&lt;BR /&gt;struct tm *timptr; &lt;BR /&gt;int tim;&lt;BR /&gt;time(&amp;amp;tim);&lt;BR /&gt;timptr=localtime(&amp;amp;tim); &lt;BR /&gt;printf("%02d",timptr-&amp;gt;tm_mday);  &lt;BR /&gt;return 1;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Can anybody help me please.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Vasu&lt;BR /&gt;&lt;/STRING.H&gt;&lt;/TIME.H&gt;</description>
    <pubDate>Fri, 20 Aug 2004 01:36:18 GMT</pubDate>
    <dc:creator>seek</dc:creator>
    <dc:date>2004-08-20T01:36:18Z</dc:date>
    <item>
      <title>32bit and 64 bit pro*c  program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/32bit-and-64-bit-pro-c-program/m-p/4857948#M866802</link>
      <description>i compiled bellow pro*c sample by using 32bit compiler but 64 bit compiler i am getting errors.My os is AIX ver 5.2.&lt;BR /&gt;&lt;BR /&gt;#include &lt;TIME.H&gt;&lt;BR /&gt;#include&lt;STRING.H&gt;&lt;BR /&gt;int main()&lt;BR /&gt;{&lt;BR /&gt;struct tm *timptr; &lt;BR /&gt;int tim;&lt;BR /&gt;time(&amp;amp;tim);&lt;BR /&gt;timptr=localtime(&amp;amp;tim); &lt;BR /&gt;printf("%02d",timptr-&amp;gt;tm_mday);  &lt;BR /&gt;return 1;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Can anybody help me please.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Vasu&lt;BR /&gt;&lt;/STRING.H&gt;&lt;/TIME.H&gt;</description>
      <pubDate>Fri, 20 Aug 2004 01:36:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/32bit-and-64-bit-pro-c-program/m-p/4857948#M866802</guid>
      <dc:creator>seek</dc:creator>
      <dc:date>2004-08-20T01:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: 32bit and 64 bit pro*c  program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/32bit-and-64-bit-pro-c-program/m-p/4857949#M866803</link>
      <description>something is wrong with ur compiler. b'cause i'm getting no errors when i tried the same program in a AIX 2.5 machine.&lt;BR /&gt;&lt;BR /&gt;Can u show the error msg?</description>
      <pubDate>Fri, 20 Aug 2004 02:24:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/32bit-and-64-bit-pro-c-program/m-p/4857949#M866803</guid>
      <dc:creator>Sathish_3</dc:creator>
      <dc:date>2004-08-20T02:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: 32bit and 64 bit pro*c  program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/32bit-and-64-bit-pro-c-program/m-p/4857950#M866804</link>
      <description>Hi Vasu,&lt;BR /&gt;&lt;BR /&gt;What error are you getting?&lt;BR /&gt;If it is mismatch ABI then you may have to set your paths correctly.&lt;BR /&gt;&lt;BR /&gt;Manish</description>
      <pubDate>Fri, 20 Aug 2004 02:31:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/32bit-and-64-bit-pro-c-program/m-p/4857950#M866804</guid>
      <dc:creator>Manish Srivastava</dc:creator>
      <dc:date>2004-08-20T02:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: 32bit and 64 bit pro*c  program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/32bit-and-64-bit-pro-c-program/m-p/4857951#M866805</link>
      <description>AIX? That's IBM's unix, nothing to do with HP. But let me try anyway...&lt;BR /&gt;&lt;BR /&gt;Because you didn't tell *what* error messages you're getting, it's a bit difficult to guess what the actual problem is. &lt;BR /&gt;&lt;BR /&gt;You seem to be assuming that the value of time() is a signed 32-bit integer, or in other words, anything that fits in int.&lt;BR /&gt;&lt;BR /&gt;Don't assume that, or your assumption may come to haunt you on Tuesday 19. of January 2038, at about 03:14 UTC time (the end of the traditional Unix epoch).&lt;BR /&gt;&lt;BR /&gt;Besides, explicitly using time_t type would be better style. It will also make it easier to fix your programs when the real rush to fix Y2038 problems finally begins.&lt;BR /&gt;&lt;BR /&gt;The AIX 64-bit compiler may be already defining time_t as something larger, and you might be getting an error message because of that.&lt;BR /&gt;</description>
      <pubDate>Fri, 20 Aug 2004 03:33:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/32bit-and-64-bit-pro-c-program/m-p/4857951#M866805</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2004-08-20T03:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: 32bit and 64 bit pro*c  program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/32bit-and-64-bit-pro-c-program/m-p/4857952#M866806</link>
      <description>You must be really desparate posting AIX compiler issues in HP's ITRC Forums... :)&lt;BR /&gt;&lt;BR /&gt;FWIW, the advice about types is likely spot-on.  Compiling your bit of test code on an HP-UX 11.11 system (even 32-bit) yielded the following warnings:&lt;BR /&gt;&lt;BR /&gt;$ cc foo.c&lt;BR /&gt;cc: "foo.c", line 7: warning 604: Pointers are not assignment-compatible.&lt;BR /&gt;cc: "foo.c", line 7: warning 563: Argument #1 is not the correct type.&lt;BR /&gt;cc: "foo.c", line 8: warning 604: Pointers are not assignment-compatible.&lt;BR /&gt;cc: "foo.c", line 8: warning 563: Argument #1 is not the correct type.&lt;BR /&gt;&lt;BR /&gt;changing the type of "tim" from int to time_t made those warnings go away, and the program compiled without warning or error in 64-bit mode with HP's C compiler.  Compiling the original source in 64-bit mode under the HP compiler yields:&lt;BR /&gt;&lt;BR /&gt;$ cc +DD64 foo.c&lt;BR /&gt;cc: "foo.c", line 7: warning 729: Argument #1 converts int* to long*.&lt;BR /&gt;cc: "foo.c", line 8: warning 729: Argument #1 converts int* to long*.&lt;BR /&gt;&lt;BR /&gt;which, while on the surface seems silly if one thinks a pointer is a pointer, really isnt since an int and a long have different alignment requirements in 64-bit mode - int remains four-byte alignment, but long (LP64 mode) gets an eight-byte alignment requirement.&lt;BR /&gt;&lt;BR /&gt;Now, for posting an AIX question in HP's ITRC Forums, you are now required to go-out and buy some additional HP kit :)</description>
      <pubDate>Fri, 20 Aug 2004 18:32:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/32bit-and-64-bit-pro-c-program/m-p/4857952#M866806</guid>
      <dc:creator>rick jones</dc:creator>
      <dc:date>2004-08-20T18:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: 32bit and 64 bit pro*c  program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/32bit-and-64-bit-pro-c-program/m-p/4857953#M866807</link>
      <description>I think this is what you are looking for : &lt;BR /&gt;&lt;BR /&gt;#include &lt;TIME.H&gt;&lt;BR /&gt;#include &lt;STDLIB.H&gt;&lt;BR /&gt;#include &lt;STRING.H&gt;&lt;BR /&gt;&lt;BR /&gt;struct tm when;&lt;BR /&gt;time_t    now;&lt;BR /&gt;time_t    result;&lt;BR /&gt;&lt;BR /&gt;int main()&lt;BR /&gt;{&lt;BR /&gt;time(&amp;amp;now);&lt;BR /&gt;when=*localtime(&amp;amp;now);&lt;BR /&gt;printf("Month %d\n",when.tm_mon);&lt;BR /&gt;printf("Day   %d\n",when.tm_mday);&lt;BR /&gt;printf("Year  %d\n",when.tm_year+1900);&lt;BR /&gt;return 1;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;= Mike =&lt;/STRING.H&gt;&lt;/STDLIB.H&gt;&lt;/TIME.H&gt;</description>
      <pubDate>Mon, 23 Aug 2004 10:28:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/32bit-and-64-bit-pro-c-program/m-p/4857953#M866807</guid>
      <dc:creator>Mike Miller_8</dc:creator>
      <dc:date>2004-08-23T10:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: 32bit and 64 bit pro*c  program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/32bit-and-64-bit-pro-c-program/m-p/4857954#M866808</link>
      <description>What happens if you go directly to the c compiler? &lt;BR /&gt;&lt;BR /&gt;pro*c is a pre-processor and in theory, will have no effect on anything unless there are some #EXEC SQL lines in your code. &lt;BR /&gt;&lt;BR /&gt;My basic troubleshooting technique is to simplify the problem until it works and then go back step by step until it breaks. Once it breaks you know where to look. &lt;BR /&gt;&lt;BR /&gt;Since the pro*c runs a preprocessor and then the compiler, eliminate the preprocessor step. The other respondents show that they can run the C compiler. Maybe the difference is something that the pro*c is tossing in?&lt;BR /&gt;&lt;BR /&gt;Typically, the pro*c has a .pc extension and emitts a .c file. Check your .c file to see if pro*c has done anything to it? In your example, it should be the same file, just with some extra stuff from pro*c.&lt;BR /&gt;&lt;BR /&gt;-Good Luck</description>
      <pubDate>Mon, 23 Aug 2004 11:36:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/32bit-and-64-bit-pro-c-program/m-p/4857954#M866808</guid>
      <dc:creator>R. Allan Hicks</dc:creator>
      <dc:date>2004-08-23T11:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: 32bit and 64 bit pro*c  program</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/32bit-and-64-bit-pro-c-program/m-p/4857955#M866809</link>
      <description>we have to use LONG instead of INT data type</description>
      <pubDate>Tue, 24 Aug 2004 04:19:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/32bit-and-64-bit-pro-c-program/m-p/4857955#M866809</guid>
      <dc:creator>seek</dc:creator>
      <dc:date>2004-08-24T04:19:25Z</dc:date>
    </item>
  </channel>
</rss>

