<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>25325</bug_id>
          
          <creation_ts>2009-04-22 08:53:05 -0700</creation_ts>
          <short_desc>Make sure pthread_self() is declared before it gets called</short_desc>
          <delta_ts>2009-05-14 07:27:06 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Laszlo Gombos">laszlo.gombos</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>zecke</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>118380</commentid>
    <comment_count>0</comment_count>
    <who name="Laszlo Gombos">laszlo.gombos</who>
    <bug_when>2009-04-22 08:53:05 -0700</bug_when>
    <thetext>On some Unix-like platforms Collector.cpp fails to compile because pthread.h does not get included. The problem might be specific to those WebKit ports where neither WTF_USE_PTHREADS nor JSC_MULTIPLE_THREADS is defined (e.g. Qt port on Linux/FREEBSD/NETBSD).

The currentThreadStackBase() in Collector.cpp calls pthread_self() on most Unix-like platforms. OPENBSD includes pthread.h explicitly but none of the other Unix-like platforms do so. On the Qt Linux WebKit build, pthread.h gets implicitly included from algorithm, which makes the Qt Unix-like builds dependent on a particular STL implementation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>118381</commentid>
    <comment_count>1</comment_count>
      <attachid>29680</attachid>
    <who name="Laszlo Gombos">laszlo.gombos</who>
    <bug_when>2009-04-22 08:59:43 -0700</bug_when>
    <thetext>Created attachment 29680
Proposed fix to include pthread.h in most Unix-like platforms (not just for OPENBSD) in Collector.cpp.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>120782</commentid>
    <comment_count>2</comment_count>
      <attachid>29680</attachid>
    <who name="Holger Freyther">zecke</who>
    <bug_when>2009-05-11 20:37:37 -0700</bug_when>
    <thetext>Comment on attachment 29680
Proposed fix to include pthread.h in most Unix-like platforms (not just for OPENBSD) in Collector.cpp.


&gt;  
&gt;  #if PLATFORM(SOLARIS)
&gt;  #include &lt;thread.h&gt;
&gt; -#endif
&gt; -
&gt; -#if PLATFORM(OPENBSD)
&gt; +#else
&gt;  #include &lt;pthread.h&gt;
&gt;  #endif
&gt;  

I&apos;m not convinced why including this for WINDOWS and DARWIN is a good idea.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>120783</commentid>
    <comment_count>3</comment_count>
    <who name="Laszlo Gombos">laszlo.gombos</who>
    <bug_when>2009-05-11 20:46:52 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 29680 [review])
&gt; &gt;  
&gt; &gt;  #if PLATFORM(SOLARIS)
&gt; &gt;  #include &lt;thread.h&gt;
&gt; &gt; -#endif
&gt; &gt; -
&gt; &gt; -#if PLATFORM(OPENBSD)
&gt; &gt; +#else
&gt; &gt;  #include &lt;pthread.h&gt;
&gt; &gt;  #endif
&gt; &gt;  
&gt; I&apos;m not convinced why including this for WINDOWS and DARWIN is a good idea.

This entire code segment is guarded with 

#if PLATFORM(DARWIN)
#elif PLATFORM(WIN_OS)
#elif PLATFORM(UNIX)

so pthread.h won&apos;t be included for WIN_OS and DARWIN. 

I realize that the diff does not show enough context in this case. With this additional information, I will put up the patch for review again.



</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>120848</commentid>
    <comment_count>4</comment_count>
      <attachid>29680</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2009-05-12 07:48:17 -0700</bug_when>
    <thetext>Comment on attachment 29680
Proposed fix to include pthread.h in most Unix-like platforms (not just for OPENBSD) in Collector.cpp.

Seems OK, r=me

But maybe HAVE_PTHREAD_H would be an even more reliable way of doing this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121288</commentid>
    <comment_count>5</comment_count>
    <who name="Holger Freyther">zecke</who>
    <bug_when>2009-05-14 07:27:06 -0700</bug_when>
    <thetext>Landed in r43698.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>29680</attachid>
            <date>2009-04-22 08:59:43 -0700</date>
            <delta_ts>2009-05-12 07:48:17 -0700</delta_ts>
            <desc>Proposed fix to include pthread.h in most Unix-like platforms (not just for OPENBSD) in Collector.cpp.</desc>
            <filename>patch_25325.txt</filename>
            <type>text/plain</type>
            <size>1012</size>
            <attacher name="Laszlo Gombos">laszlo.gombos</attacher>
            
              <data encoding="base64">SW5kZXg6IEphdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBKYXZhU2NyaXB0
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDQyNzQ5KQorKysgSmF2YVNjcmlwdENvcmUvQ2hhbmdl
TG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMTQgQEAKKzIwMDktMDQtMjIgIExhc3psbyBH
b21ib3MgIDxsYXN6bG8uMS5nb21ib3NAbm9raWEuY29tPgorCisgICAgICAgIFJldmlld2VkIGJ5
IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3df
YnVnLmNnaT9pZD0yNTMyNQorCisgICAgICAgIE1ha2Ugc3VyZSBwdGhyZWFkX3NlbGYoKSBpcyBk
ZWNsYXJlZCBiZWZvcmUgaXQgZ2V0cyBjYWxsZWQgaW4gQ29sbGVjdG9yLmNwcAorCisgICAgICAg
ICogcnVudGltZS9Db2xsZWN0b3IuY3BwOiBJbmNsdWRlIHB0aHJlYWQuaCBpbiBtb3N0IFVuaXgt
bGlrZSBwbGF0Zm9ybXMgCisgICAgICAgIChub3QganVzdCBmb3IgT1BFTkJTRCkKKwogMjAwOS0w
NC0yMiAgT2xpdmVyIEh1bnQgIDxvbGl2ZXJAYXBwbGUuY29tPgogCiAgICAgICAgIFJldmlld2Vk
IGJ5IE5PQk9EWSAoQnVpbGRmaXgpLgpJbmRleDogSmF2YVNjcmlwdENvcmUvcnVudGltZS9Db2xs
ZWN0b3IuY3BwCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT0KLS0tIEphdmFTY3JpcHRDb3JlL3J1bnRpbWUvQ29sbGVjdG9y
LmNwcAkocmV2aXNpb24gNDI3NDgpCisrKyBKYXZhU2NyaXB0Q29yZS9ydW50aW1lL0NvbGxlY3Rv
ci5jcHAJKHdvcmtpbmcgY29weSkKQEAgLTU5LDkgKzU5LDcgQEAKIAogI2lmIFBMQVRGT1JNKFNP
TEFSSVMpCiAjaW5jbHVkZSA8dGhyZWFkLmg+Ci0jZW5kaWYKLQotI2lmIFBMQVRGT1JNKE9QRU5C
U0QpCisjZWxzZQogI2luY2x1ZGUgPHB0aHJlYWQuaD4KICNlbmRpZgogCg==
</data>
<flag name="review"
          id="14835"
          type_id="1"
          status="+"
          setter="darin"
    />
          </attachment>
      

    </bug>

</bugzilla>