<?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 Re: strtok_r 64 BIT HP unix in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/strtok-r-64-bit-hp-unix/m-p/3200435#M714166</link>
    <description>Hi&lt;BR /&gt;&lt;BR /&gt;Srinivasan,&lt;BR /&gt;&lt;BR /&gt;I'm glad it's working.&lt;BR /&gt;Sometimes analyzing teories is less usefull than simple source checking:&lt;BR /&gt;&lt;BR /&gt;more /usr/include/string.h&lt;BR /&gt;&lt;BR /&gt;[...]&lt;BR /&gt;&lt;BR /&gt;#    ifdef _REENTRANT&lt;BR /&gt;        extern char *strtok_r(char *, const char *, char **);&lt;BR /&gt;#          ifdef _PTHREADS_DRAFT4&lt;BR /&gt;        extern int strerror_r(int, char *, int);&lt;BR /&gt;#          endif /* _PTHREADS_DRAFT4 */&lt;BR /&gt;#    endif&lt;BR /&gt;&lt;BR /&gt;[...]&lt;BR /&gt;&lt;BR /&gt;And thats it. Not defined = not declared.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Mark,&lt;BR /&gt;&lt;BR /&gt;I'm surprized that it produced warnings, as return value is char * and is assigned to char *, so I cannot see what to warn about. However I have a rule not to argue with facts.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Good luck&lt;BR /&gt;Adam&lt;BR /&gt;</description>
    <pubDate>Tue, 24 Feb 2004 09:23:34 GMT</pubDate>
    <dc:creator>Adam J Markiewicz</dc:creator>
    <dc:date>2004-02-24T09:23:34Z</dc:date>
    <item>
      <title>strtok_r 64 BIT HP unix</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strtok-r-64-bit-hp-unix/m-p/3200423#M714154</link>
      <description>Is strtok_r is supported in 64 BIT HP unix ?&lt;BR /&gt;When compiled in 64 Bit it gives warning.&lt;BR /&gt;and on usage it gives core dump.&lt;BR /&gt;&lt;BR /&gt;Have any one faced similar problem ,thought confirm.&lt;BR /&gt;</description>
      <pubDate>Tue, 24 Feb 2004 06:28:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strtok-r-64-bit-hp-unix/m-p/3200423#M714154</guid>
      <dc:creator>Srinivasan S_1</dc:creator>
      <dc:date>2004-02-24T06:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: strtok_r 64 BIT HP unix</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strtok-r-64-bit-hp-unix/m-p/3200424#M714155</link>
      <description>Did you try this depot file?? Not sure if it will be helpful,&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.connect.org.uk/hppd/hpux/Development/Tools/TS-1.08/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/Development/Tools/TS-1.08/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;-Karthik S S</description>
      <pubDate>Tue, 24 Feb 2004 06:32:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strtok-r-64-bit-hp-unix/m-p/3200424#M714155</guid>
      <dc:creator>Karthik S S</dc:creator>
      <dc:date>2004-02-24T06:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: strtok_r 64 BIT HP unix</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strtok-r-64-bit-hp-unix/m-p/3200425#M714156</link>
      <description>Well, I've just been playing with it and strtok() is fine but I get a bus error using strtok_r.&lt;BR /&gt; &lt;BR /&gt;Weird!  I'll keep playing with that!</description>
      <pubDate>Tue, 24 Feb 2004 06:46:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strtok-r-64-bit-hp-unix/m-p/3200425#M714156</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-02-24T06:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: strtok_r 64 BIT HP unix</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strtok-r-64-bit-hp-unix/m-p/3200426#M714157</link>
      <description>Actually, I'm seem to be going a bit daft.  Forgot that strtok_r needs to be passed the address of the character string pointer, not the character string pointer itself.  It seems to be ok now.&lt;BR /&gt; &lt;BR /&gt;Maybe you are doing the same thing?</description>
      <pubDate>Tue, 24 Feb 2004 06:52:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strtok-r-64-bit-hp-unix/m-p/3200426#M714157</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-02-24T06:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: strtok_r 64 BIT HP unix</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strtok-r-64-bit-hp-unix/m-p/3200427#M714158</link>
      <description>Eg: t1.c&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;STRINGS.H&gt;&lt;BR /&gt;#include &lt;STDLIB.H&gt;&lt;BR /&gt;void main(){&lt;BR /&gt;        char usr[36];&lt;BR /&gt;        char *name[5];&lt;BR /&gt;        char *arr=NULL;&lt;BR /&gt;        memset(usr,'\0',sizeof(usr));&lt;BR /&gt;        strcpy(usr,"ab cd ef");&lt;BR /&gt;        name[0]=(char *)strtok_r(usr," ",&amp;amp;arr);&lt;BR /&gt;        printf("arr is %s\n",arr);&lt;BR /&gt;        printf("name is %s\n",name[0]);&lt;BR /&gt;        return ;&lt;BR /&gt;}&lt;BR /&gt;[node:/tmp]&lt;BR /&gt;Compilation Trace:&lt;BR /&gt;cc +DD64 -g -o t1 t1.c&lt;BR /&gt;cc:  487: warning : Possibly incorrect message catalog.&lt;BR /&gt;cc: "t1.c",  10:  724: , line : warning Cast:  converts default int return type to pointer.&lt;BR /&gt;&lt;BR /&gt;The same Code goes without warning in 32 bit compilation mode but aborts in 64 bit.&lt;BR /&gt;I am unable to track why this warning is produced in 64 BIT compilation&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;&lt;/STDLIB.H&gt;&lt;/STRINGS.H&gt;&lt;/STDIO.H&gt;</description>
      <pubDate>Tue, 24 Feb 2004 07:14:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strtok-r-64-bit-hp-unix/m-p/3200427#M714158</guid>
      <dc:creator>Srinivasan S_1</dc:creator>
      <dc:date>2004-02-24T07:14:48Z</dc:date>
    </item>
    <item>
      <title>Re: strtok_r 64 BIT HP unix</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strtok-r-64-bit-hp-unix/m-p/3200428#M714159</link>
      <description>Ok, I have just compiled and run your code fine on 11.0 64 bit and 11i 64 bit.&lt;BR /&gt;  &lt;BR /&gt;What compiler are you using?  I'm just using the default compiler that comes with a standard HPUX install.  I just compiled it fine using gcc though that was on Linux.</description>
      <pubDate>Tue, 24 Feb 2004 07:28:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strtok-r-64-bit-hp-unix/m-p/3200428#M714159</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-02-24T07:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: strtok_r 64 BIT HP unix</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strtok-r-64-bit-hp-unix/m-p/3200429#M714160</link>
      <description>cpp.ansi: HP92453-01 B.11.11.06 HP C Preprocessor (ANSI)&lt;BR /&gt;ccom: HP92453-01 B.11.11.28212.GP HP C Compiler</description>
      <pubDate>Tue, 24 Feb 2004 07:41:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strtok-r-64-bit-hp-unix/m-p/3200429#M714160</guid>
      <dc:creator>Srinivasan S_1</dc:creator>
      <dc:date>2004-02-24T07:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: strtok_r 64 BIT HP unix</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strtok-r-64-bit-hp-unix/m-p/3200430#M714161</link>
      <description>The compiler used for strtok_r problem is&lt;BR /&gt;&lt;BR /&gt;cpp.ansi: HP92453-01 B.11.11.06 HP C Preprocessor (ANSI)&lt;BR /&gt;ccom: HP92453-01 B.11.11.28212.GP HP C Compiler&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 24 Feb 2004 07:42:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strtok-r-64-bit-hp-unix/m-p/3200430#M714161</guid>
      <dc:creator>Srinivasan S_1</dc:creator>
      <dc:date>2004-02-24T07:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: strtok_r 64 BIT HP unix</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strtok-r-64-bit-hp-unix/m-p/3200431#M714162</link>
      <description>I can't see any patches for this either.&lt;BR /&gt; &lt;BR /&gt;If you are running this on a 64 bit machine, try compiling it with no options i.e just "-o"</description>
      <pubDate>Tue, 24 Feb 2004 07:50:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strtok-r-64-bit-hp-unix/m-p/3200431#M714162</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-02-24T07:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: strtok_r 64 BIT HP unix</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strtok-r-64-bit-hp-unix/m-p/3200432#M714163</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;&lt;BR /&gt;cc: "t1.c", 10: 724: , line : warning Cast: converts default int return type to pointer.&lt;BR /&gt;&amp;lt;&amp;lt;&lt;BR /&gt;&lt;BR /&gt;Undoubtly you use the function that is not previously declared to the compiler. It should work even without casting.&lt;BR /&gt;&lt;BR /&gt;try:&lt;BR /&gt;&lt;BR /&gt;cc +DD64 -g -o t1 -D_REENTRANT t1.c&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Good luck&lt;BR /&gt;Adam&lt;BR /&gt;</description>
      <pubDate>Tue, 24 Feb 2004 07:55:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strtok-r-64-bit-hp-unix/m-p/3200432#M714163</guid>
      <dc:creator>Adam J Markiewicz</dc:creator>
      <dc:date>2004-02-24T07:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: strtok_r 64 BIT HP unix</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strtok-r-64-bit-hp-unix/m-p/3200433#M714164</link>
      <description>Adam,&lt;BR /&gt; &lt;BR /&gt;I tried it with and without the cast.  Both worked fine though without the cast produced warnings at compile.</description>
      <pubDate>Tue, 24 Feb 2004 08:00:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strtok-r-64-bit-hp-unix/m-p/3200433#M714164</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-02-24T08:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: strtok_r 64 BIT HP unix</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strtok-r-64-bit-hp-unix/m-p/3200434#M714165</link>
      <description>Hi !&lt;BR /&gt;Its working ! Thanks.&lt;BR /&gt;&lt;BR /&gt;I thought REENTRANT option should be used for Multithreading functions. &lt;BR /&gt;&lt;BR /&gt;Since,strtok_r one way is reentrancy even though no multithreaded calls are there ,we should use this option. &lt;BR /&gt;&lt;BR /&gt;Is my understanding correct.&lt;BR /&gt;&lt;BR /&gt;Thanks for help. But I am not able to understand whether this is justified</description>
      <pubDate>Tue, 24 Feb 2004 08:16:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strtok-r-64-bit-hp-unix/m-p/3200434#M714165</guid>
      <dc:creator>Srinivasan S_1</dc:creator>
      <dc:date>2004-02-24T08:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: strtok_r 64 BIT HP unix</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strtok-r-64-bit-hp-unix/m-p/3200435#M714166</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Srinivasan,&lt;BR /&gt;&lt;BR /&gt;I'm glad it's working.&lt;BR /&gt;Sometimes analyzing teories is less usefull than simple source checking:&lt;BR /&gt;&lt;BR /&gt;more /usr/include/string.h&lt;BR /&gt;&lt;BR /&gt;[...]&lt;BR /&gt;&lt;BR /&gt;#    ifdef _REENTRANT&lt;BR /&gt;        extern char *strtok_r(char *, const char *, char **);&lt;BR /&gt;#          ifdef _PTHREADS_DRAFT4&lt;BR /&gt;        extern int strerror_r(int, char *, int);&lt;BR /&gt;#          endif /* _PTHREADS_DRAFT4 */&lt;BR /&gt;#    endif&lt;BR /&gt;&lt;BR /&gt;[...]&lt;BR /&gt;&lt;BR /&gt;And thats it. Not defined = not declared.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Mark,&lt;BR /&gt;&lt;BR /&gt;I'm surprized that it produced warnings, as return value is char * and is assigned to char *, so I cannot see what to warn about. However I have a rule not to argue with facts.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Good luck&lt;BR /&gt;Adam&lt;BR /&gt;</description>
      <pubDate>Tue, 24 Feb 2004 09:23:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strtok-r-64-bit-hp-unix/m-p/3200435#M714166</guid>
      <dc:creator>Adam J Markiewicz</dc:creator>
      <dc:date>2004-02-24T09:23:34Z</dc:date>
    </item>
  </channel>
</rss>

