public inbox for pthreads-win32@sourceware.org
 help / color / mirror / Atom feed
From: Dimitar Panayotov <develop@mail.bg>
To: pthreads-win32@sources.redhat.com
Subject: static link last build issue & question
Date: Tue, 12 Apr 2005 15:28:00 -0000	[thread overview]
Message-ID: <1113319690.fae3b25d4c132@mail.bg> (raw)

Hello. I guess you have much more important issues to solve
in PTW32, but may I remind of one small alteration, which
seem to be not spotted in my preceding post?

When linking statically, <dll.c> must not be included in
<pthread.c> since it is possible you to build a DLL which
you want to be statically linked to PTW32, in which case
your DllMain() will conflict with the PTW32's DllMain().
So, in <pthread.c>, instead of:

#include "dll.c"

the code must be:

#ifndef PTW32_STATIC_LIB
#include "dll.c"
#endif

This will avoid link-time error I mentioned above.
(Note that the static link method I use is to include
<pthread.c> in my project or in the Makefile so that it
will be built with the PTW32_STATIC_LIB macro being
defined, and the object file -- included in the final
link.)

And, because of the obscurity of the statement
[pthread_win32_thread_attach_np() is currently a no-op, but
thread_win32_thread_detach_np() is needed to clean up the
implicit pthread handle that is allocated to a Win32 thread
if it calls certain pthreads routines] (found in
README.NONPORTABLE), I have the following questions:

Can we be supplied with a list of those routines, calling of
which will make it compulsory for the WIN32 thread to call
"pthread_win32_thread_detach_np()" when it exits? And, if
not, is it safe always to call
"pthread_win32_thread_detach_np()" even if no PTW32 API is
used in it?

Thank you.

-
Dimitar Panayotov
develop@mail.bg
+359886420488


--------------------------------------
Безплатната поща в mail.bg вече е 1GB!


             reply	other threads:[~2005-04-12 15:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-12 15:28 Dimitar Panayotov [this message]
2005-04-12 16:26 ` Ross Johnson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1113319690.fae3b25d4c132@mail.bg \
    --to=develop@mail.bg \
    --cc=pthreads-win32@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).