public inbox for pthreads-win32@sourceware.org
 help / color / mirror / Atom feed
* unexpected end of file :-(
@ 2004-11-02  9:59 Bastian Voigt
  2004-11-03  1:38 ` Ross Johnson
       [not found] ` <41883645.70704@callisto.canberra.edu.au>
  0 siblings, 2 replies; 3+ messages in thread
From: Bastian Voigt @ 2004-11-02  9:59 UTC (permalink / raw)
  To: pthreads-win32

Hello List!

I am working with pthreads-win32 and the microsoft vc++ compiler version 6.
I have a problem I already spent hours on:

I have ported a source file which was perfectly working before, to run 
in an own pthread.
Now the compiler always bitches about "unexpected end of file" (fatal 
error C1004).
On the following MSDN library page a verbose error description can be found:

http://msdn.microsoft.com/library/en-us/vccore/html/C1004.asp

- When I comment out all the pthreads related function calls and the 
#include pthreads statement,
then the file compiles perfectly. And yes, I am pretty sure that those 
lines are syntactically correct.

- When all the used pthread_* functions are defined as macros the file 
also compiles perfectly:
//#include <pthread.h>   
#define pthread_setcancelstate(a, b)
#define PTHREAD_CANCEL_DISABLE 1
#define pthread_cleanup_push(a,b)
#define pthread_exit(a)


So it appears to me that the problem must lie somewhere inside pthread.h ?
BTW my project also includes the IBM SCC libraries
(see http://www-3.ibm.com/security/cryptocards/html/overproduct.shtml).
I have managed to compile and run a little pthreads example program, but 
that was without SCC library import...


Any thoughts on this matter highly appreciated..

Greetings
Bastian Voigt

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: unexpected end of file :-(
  2004-11-02  9:59 unexpected end of file :-( Bastian Voigt
@ 2004-11-03  1:38 ` Ross Johnson
       [not found] ` <41883645.70704@callisto.canberra.edu.au>
  1 sibling, 0 replies; 3+ messages in thread
From: Ross Johnson @ 2004-11-03  1:38 UTC (permalink / raw)
  To: pthreads-win32

Hi Bastian,

There haven't been any other reports of this problem. Are 
you using a snapshot version of the pthreads-win32 library, 
or a version out of CVS?

One other thing I notice though - you said that when you 
#define all the pthread functions that you use it works, but 
you have defined
#define pthread_cleanup_push(a,b)
and no
#define pthread_cleanup_pop(a)

Is that an omission? The way these are defined is as a pair 
that forms the start and end of a block. That is, push with 
no pop will create an unbalanced { ... }, and that could be 
the problem.

Regards.
Ross

Bastian Voigt wrote:

> Hello List!
>
> I am working with pthreads-win32 and the microsoft vc++ compiler 
> version 6.
> I have a problem I already spent hours on:
>
> I have ported a source file which was perfectly working before, to run 
> in an own pthread.
> Now the compiler always bitches about "unexpected end of file" (fatal 
> error C1004).
> On the following MSDN library page a verbose error description can be 
> found:
>
> http://msdn.microsoft.com/library/en-us/vccore/html/C1004.asp
>
> - When I comment out all the pthreads related function calls and the 
> #include pthreads statement,
> then the file compiles perfectly. And yes, I am pretty sure that those 
> lines are syntactically correct.
>
> - When all the used pthread_* functions are defined as macros the file 
> also compiles perfectly:
> //#include <pthread.h>   #define pthread_setcancelstate(a, b)
> #define PTHREAD_CANCEL_DISABLE 1
> #define pthread_cleanup_push(a,b)
> #define pthread_exit(a)
>
>
> So it appears to me that the problem must lie somewhere inside 
> pthread.h ?
> BTW my project also includes the IBM SCC libraries
> (see http://www-3.ibm.com/security/cryptocards/html/overproduct.shtml).
> I have managed to compile and run a little pthreads example program, 
> but that was without SCC library import...
>
>
> Any thoughts on this matter highly appreciated..
>
> Greetings
> Bastian Voigt
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: unexpected end of file :-(
       [not found] ` <41883645.70704@callisto.canberra.edu.au>
@ 2004-11-03 10:50   ` Bastian Voigt
  0 siblings, 0 replies; 3+ messages in thread
From: Bastian Voigt @ 2004-11-03 10:50 UTC (permalink / raw)
  To: pthreads-win32

Ross Johnson wrote:

> #define pthread_cleanup_push(a,b)
> and no
> #define pthread_cleanup_pop(a)
>
> Is that an omission? 

No, it's not :-)

> The way these are defined is as a pair that forms the start and end of 
> a block. That is, push with no pop will create an unbalanced { ... }, 
> and that could be the problem.

Yes, that was the problem. I must admit Iam a pthreads n00b ..Thanks for 
your help!

Regards,
Bastian Voigt

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-11-03 10:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-02  9:59 unexpected end of file :-( Bastian Voigt
2004-11-03  1:38 ` Ross Johnson
     [not found] ` <41883645.70704@callisto.canberra.edu.au>
2004-11-03 10:50   ` Bastian Voigt

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).