public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* wstring support in GCC 4.1.2 in Cygwin 1.5.25-11
@ 2008-05-16 15:58 jadooo
  2008-05-16 18:42 ` Yaakov (Cygwin Ports)
                   ` (2 more replies)
  0 siblings, 3 replies; 43+ messages in thread
From: jadooo @ 2008-05-16 15:58 UTC (permalink / raw)
  To: cygwin


Hi All,
I was trying to compile my code on Cygwin[1.5.25-11] with GCC[4.1.2], 
but I am not able to build with errors on wstring. 
 
I tried to test a simple application which uses wstring, like
 
#include <string>
#include <iostream>
int main( ) 
{
   using namespace std;
  
 const basic_string <wchar_t> s1 ( L"abc" );
   wstring s2 ( L"abc" );   // Uses the typedef for wstring
   if ( s1 == s2 )
      cout << "The strings s1 & s2 are equal." << endl;
   else
      cout << "The strings s1 & s2 are not equal." << endl;
}
 
and on compiling I am getting the following error..
 
-->g++ main.cpp -o main
main.cpp: In function `int main()':
main.cpp:8: error: `wstring' undeclared (first use this function)
main.cpp:8: error: (Each undeclared identifier is reported only once for
each fu
nction it appears in.)
main.cpp:8: error: expected `;' before "s2"
main.cpp:9: error: `s2' undeclared (first use this function)
 
I searched on the net but could not get any thing recent or useful. Some old
forum threads[2005] say that 
it was not supported. 
 
Any advice or pointer will be of great help.
 
Thanks & Regards
Vipin

-- 
View this message in context: http://www.nabble.com/wstring-support-in-GCC-4.1.2-in-Cygwin-1.5.25-11-tp17275355p17275355.html
Sent from the Cygwin list mailing list archive at Nabble.com.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: wstring support in GCC 4.1.2 in Cygwin 1.5.25-11
  2008-05-16 15:58 wstring support in GCC 4.1.2 in Cygwin 1.5.25-11 jadooo
@ 2008-05-16 18:42 ` Yaakov (Cygwin Ports)
  2008-05-17 12:00 ` jadooo
  2008-05-21 11:41 ` wstring support in GCC 4.1.2 in Cygwin 1.5.25-11 jadooo
  2 siblings, 0 replies; 43+ messages in thread
From: Yaakov (Cygwin Ports) @ 2008-05-16 18:42 UTC (permalink / raw)
  To: cygwin

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

jadooo wrote:
| I was trying to compile my code on Cygwin[1.5.25-11] with GCC[4.1.2],
| but I am not able to build with errors on wstring.

Cygwin 1.5 is not fully unicode enabled and does not provide wstring;
you'll need to wait for 1.7.


Yaakov
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEAREIAAYFAkgt0iEACgkQpiWmPGlmQSNy5ACfS9mZCvjb1hExJpYMiDdTEXIp
CVcAn3oBtvmc7BfInJZdRtHjxULse8dJ
=OkLx
-----END PGP SIGNATURE-----

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: wstring support in GCC 4.1.2 in Cygwin 1.5.25-11
  2008-05-16 15:58 wstring support in GCC 4.1.2 in Cygwin 1.5.25-11 jadooo
  2008-05-16 18:42 ` Yaakov (Cygwin Ports)
@ 2008-05-17 12:00 ` jadooo
  2008-05-19  4:47   ` Larry Hall (Cygwin)
  2008-05-21 11:41 ` wstring support in GCC 4.1.2 in Cygwin 1.5.25-11 jadooo
  2 siblings, 1 reply; 43+ messages in thread
From: jadooo @ 2008-05-17 12:00 UTC (permalink / raw)
  To: cygwin


Thanks a lot for the valuable information. 
 
I have some more question on the same, just to clarrify things  a bit more..
 
What do u mean by full unicode enabled??
 
Will my code which contains 'wstring' compile?
 
I have to take some decisions based on this, so would like to know how could
I 
confirm this information. Is it there in any Cygwin specification or site
link.
 
Thanks & Regards
Vipin
 


jadooo wrote:
> 
> Hi All,
> I was trying to compile my code on Cygwin[1.5.25-11] with GCC[4.1.2], 
> but I am not able to build with errors on wstring. 
>  
> I tried to test a simple application which uses wstring, like
>  
> #include <string>
> #include <iostream>
> int main( ) 
> {
>    using namespace std;
>   
>  const basic_string <wchar_t> s1 ( L"abc" );
>    wstring s2 ( L"abc" );   // Uses the typedef for wstring
>    if ( s1 == s2 )
>       cout << "The strings s1 & s2 are equal." << endl;
>    else
>       cout << "The strings s1 & s2 are not equal." << endl;
> }
>  
> and on compiling I am getting the following error..
>  
> -->g++ main.cpp -o main
> main.cpp: In function `int main()':
> main.cpp:8: error: `wstring' undeclared (first use this function)
> main.cpp:8: error: (Each undeclared identifier is reported only once for
> each fu
> nction it appears in.)
> main.cpp:8: error: expected `;' before "s2"
> main.cpp:9: error: `s2' undeclared (first use this function)
>  
> I searched on the net but could not get any thing recent or useful. Some
> old forum threads[2005] say that 
> it was not supported. 
>  
> Any advice or pointer will be of great help.
>  
> Thanks & Regards
> Vipin
> 
> 

-- 
View this message in context: http://www.nabble.com/wstring-support-in-GCC-4.1.2-in-Cygwin-1.5.25-11-tp17275355p17290164.html
Sent from the Cygwin list mailing list archive at Nabble.com.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: wstring support in GCC 4.1.2 in Cygwin 1.5.25-11
  2008-05-17 12:00 ` jadooo
@ 2008-05-19  4:47   ` Larry Hall (Cygwin)
  2008-05-20 18:00     ` jadooo
  0 siblings, 1 reply; 43+ messages in thread
From: Larry Hall (Cygwin) @ 2008-05-19  4:47 UTC (permalink / raw)
  To: cygwin

jadooo wrote:
> Thanks a lot for the valuable information. 
>  
> I have some more question on the same, just to clarrify things  a bit more..
>  
> What do u mean by full unicode enabled??

Simple.  Cygwin 1.5.x doesn't support Unicode.  Code in CVS for the next
release series (1.7.x) will.  If you want to get some early insight, you
can check out a snapshot <http://cygwin.com/snapshots/>.  This, of course,
isn't released code so use at your own risk.  If you do try it and have
problems, report them here.

Anticipating your next question, there is no release date yet for 1.7.x.

> Will my code which contains 'wstring' compile?

You've answered this question for yourself already, no?

-- 
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
216 Dalton Rd.                          (508) 893-9889 - FAX
Holliston, MA 01746

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: wstring support in GCC 4.1.2 in Cygwin 1.5.25-11
  2008-05-19  4:47   ` Larry Hall (Cygwin)
@ 2008-05-20 18:00     ` jadooo
  2008-05-20 19:31       ` Greg Chicares
  2008-05-21  2:02       ` Brian Dessent
  0 siblings, 2 replies; 43+ messages in thread
From: jadooo @ 2008-05-20 18:00 UTC (permalink / raw)
  To: cygwin


Hi,

I tried the code from the CVS, but with those changes also the simple 
'wstring' program is not compiling. 

What all I did to test :

1) Have done a fresh Cygwin[1.5] installation.
2) From http://cygwin.com/snapshots/ have downloaded the
cygwin-inst-20080407.tar.bz2 file
3) tar -xvjf cygwin-inst-20080407.tar.bz2
4) The out put of the above command are two folders - etc and usr
5) Copied the folder into C:\Cygwin\ , thus overwritting the existing files.
6) Restarted the Cygwin terminal and tried to build the Sample application
which again failed to 
   recognize 'wstring'.

Please let me know if I am doing anything wrong.

With Warm Regards
Vipin





Larry Hall (Cygwin) wrote:
> 
> jadooo wrote:
>> Thanks a lot for the valuable information. 
>>  
>> I have some more question on the same, just to clarrify things  a bit
>> more..
>>  
>> What do u mean by full unicode enabled??
> 
> Simple.  Cygwin 1.5.x doesn't support Unicode.  Code in CVS for the next
> release series (1.7.x) will.  If you want to get some early insight, you
> can check out a snapshot <http://cygwin.com/snapshots/>.  This, of course,
> isn't released code so use at your own risk.  If you do try it and have
> problems, report them here.
> 
> Anticipating your next question, there is no release date yet for 1.7.x.
> 
>> Will my code which contains 'wstring' compile?
> 
> You've answered this question for yourself already, no?
> 
> -- 
> Larry Hall                              http://www.rfk.com
> RFK Partners, Inc.                      (508) 893-9779 - RFK Office
> 216 Dalton Rd.                          (508) 893-9889 - FAX
> Holliston, MA 01746
> 
> _____________________________________________________________________
> 
> A: Yes.
>  > Q: Are you sure?
>  >> A: Because it reverses the logical flow of conversation.
>  >>> Q: Why is top posting annoying in email?
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:       http://cygwin.com/problems.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/wstring-support-in-GCC-4.1.2-in-Cygwin-1.5.25-11-tp17275355p17345729.html
Sent from the Cygwin list mailing list archive at Nabble.com.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: wstring support in GCC 4.1.2 in Cygwin 1.5.25-11
  2008-05-20 18:00     ` jadooo
@ 2008-05-20 19:31       ` Greg Chicares
  2008-05-21  2:02       ` Brian Dessent
  1 sibling, 0 replies; 43+ messages in thread
From: Greg Chicares @ 2008-05-20 19:31 UTC (permalink / raw)
  To: cygwin

On 2008-05-20 17:16Z, jadooo wrote:
> 
> I tried the code from the CVS, but with those changes also the simple 
> 'wstring' program is not compiling. 
> 
> What all I did to test :
> 
> 1) Have done a fresh Cygwin[1.5] installation.
> 2) From http://cygwin.com/snapshots/ have downloaded the
> cygwin-inst-20080407.tar.bz2 file
> 3) tar -xvjf cygwin-inst-20080407.tar.bz2
> 4) The out put of the above command are two folders - etc and usr
> 5) Copied the folder into C:\Cygwin\ , thus overwritting the existing files.
> 6) Restarted the Cygwin terminal and tried to build the Sample application
> which again failed to 
>    recognize 'wstring'.

It sounds like you have updated the posix 'kernel', but not the
compiler. Wouldn't you need to rebuild your gcc-4.1.2's libstdc++
(or at least pass some overriding '-D' options to the compiler)?

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: wstring support in GCC 4.1.2 in Cygwin 1.5.25-11
  2008-05-20 18:00     ` jadooo
  2008-05-20 19:31       ` Greg Chicares
@ 2008-05-21  2:02       ` Brian Dessent
  2008-05-22 14:32         ` jadooo
  2008-05-22 19:14         ` wstring support in GCC 4.1.2 (OS independent) Linda Walsh
  1 sibling, 2 replies; 43+ messages in thread
From: Brian Dessent @ 2008-05-21  2:02 UTC (permalink / raw)
  To: jadooo; +Cc: cygwin

jadooo wrote:

> Please let me know if I am doing anything wrong.

Yes, you are misunderstanding the nature of the problem.

In order to support the wstring class, gcc relies on the platform's libc
supporting wide character C99 functions.  newlib does not have the
necessary support[1] so until that work is contributed, the wstring
class cannot be enabled in libstdc++.  And even then, you'd have to
rebuild libstdc++ which means rebuilding all of gcc.

Cygwin 1.7 currently contains support for unicode characters in
filenames, but this is a far cry from general wide character string
support (e.g. wprintf) so simply upgrading to 1.7 will not do anything. 
Larry's suggestion that this will start working in 1.7 is premature,
unless somebody contributes the necessary newlib improvements before 1.7
is released.

Brian

[1] For a list of the missing features see
http://cygwin.com/ml/cygwin-developers/2008-04/msg00094.html

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: wstring support in GCC 4.1.2 in Cygwin 1.5.25-11
  2008-05-16 15:58 wstring support in GCC 4.1.2 in Cygwin 1.5.25-11 jadooo
  2008-05-16 18:42 ` Yaakov (Cygwin Ports)
  2008-05-17 12:00 ` jadooo
@ 2008-05-21 11:41 ` jadooo
  2008-05-21 22:58   ` Longyu Mei
  2008-05-22 21:48   ` Linda Walsh
  2 siblings, 2 replies; 43+ messages in thread
From: jadooo @ 2008-05-21 11:41 UTC (permalink / raw)
  To: cygwin


Thanks a lot for the valuable information.

I am trying to port my application developed in linux to windows, now as
it is quiet clear that I could not use cygwin, due to lack of Unicode
support,
is there any other alternative to try out my porting activity.

Thanking you all once again for the great help.

Vipin





jadooo wrote:
> 
> Hi All,
> I was trying to compile my code on Cygwin[1.5.25-11] with GCC[4.1.2], 
> but I am not able to build with errors on wstring. 
>  
> I tried to test a simple application which uses wstring, like
>  
> #include <string>
> #include <iostream>
> int main( ) 
> {
>    using namespace std;
>   
>  const basic_string <wchar_t> s1 ( L"abc" );
>    wstring s2 ( L"abc" );   // Uses the typedef for wstring
>    if ( s1 == s2 )
>       cout << "The strings s1 & s2 are equal." << endl;
>    else
>       cout << "The strings s1 & s2 are not equal." << endl;
> }
>  
> and on compiling I am getting the following error..
>  
> -->g++ main.cpp -o main
> main.cpp: In function `int main()':
> main.cpp:8: error: `wstring' undeclared (first use this function)
> main.cpp:8: error: (Each undeclared identifier is reported only once for
> each fu
> nction it appears in.)
> main.cpp:8: error: expected `;' before "s2"
> main.cpp:9: error: `s2' undeclared (first use this function)
>  
> I searched on the net but could not get any thing recent or useful. Some
> old forum threads[2005] say that 
> it was not supported. 
>  
> Any advice or pointer will be of great help.
>  
> Thanks & Regards
> Vipin
> 
> 

-- 
View this message in context: http://www.nabble.com/wstring-support-in-GCC-4.1.2-in-Cygwin-1.5.25-11-tp17275355p17359564.html
Sent from the Cygwin list mailing list archive at Nabble.com.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: wstring support in GCC 4.1.2 in Cygwin 1.5.25-11
  2008-05-21 11:41 ` wstring support in GCC 4.1.2 in Cygwin 1.5.25-11 jadooo
@ 2008-05-21 22:58   ` Longyu Mei
  2008-05-22 10:27     ` jadooo
  2008-05-22 21:48   ` Linda Walsh
  1 sibling, 1 reply; 43+ messages in thread
From: Longyu Mei @ 2008-05-21 22:58 UTC (permalink / raw)
  To: jadooo, cygwin

How about minGW? Did you try that? I have similiar
problem and I will try to see if there is any
difference.


--- jadooo <vnair@linx.co.uk> wrote:

> 
> Thanks a lot for the valuable information.
> 
> I am trying to port my application developed in
> linux to windows, now as
> it is quiet clear that I could not use cygwin, due
> to lack of Unicode
> support,
> is there any other alternative to try out my porting
> activity.
> 
> Thanking you all once again for the great help.
> 
> Vipin
> 
> 
> 
> 
> 
> jadooo wrote:
> > 
> > Hi All,
> > I was trying to compile my code on
> Cygwin[1.5.25-11] with GCC[4.1.2], 
> > but I am not able to build with errors on wstring.
> 
> >  
> > I tried to test a simple application which uses
> wstring, like
> >  
> > #include <string>
> > #include <iostream>
> > int main( ) 
> > {
> >    using namespace std;
> >   
> >  const basic_string <wchar_t> s1 ( L"abc" );
> >    wstring s2 ( L"abc" );   // Uses the typedef
> for wstring
> >    if ( s1 == s2 )
> >       cout << "The strings s1 & s2 are equal." <<
> endl;
> >    else
> >       cout << "The strings s1 & s2 are not equal."
> << endl;
> > }
> >  
> > and on compiling I am getting the following
> error..
> >  
> > -->g++ main.cpp -o main
> > main.cpp: In function `int main()':
> > main.cpp:8: error: `wstring' undeclared (first use
> this function)
> > main.cpp:8: error: (Each undeclared identifier is
> reported only once for
> > each fu
> > nction it appears in.)
> > main.cpp:8: error: expected `;' before "s2"
> > main.cpp:9: error: `s2' undeclared (first use this
> function)
> >  
> > I searched on the net but could not get any thing
> recent or useful. Some
> > old forum threads[2005] say that 
> > it was not supported. 
> >  
> > Any advice or pointer will be of great help.
> >  
> > Thanks & Regards
> > Vipin
> > 
> > 
> 
> -- 
> View this message in context:
>
http://www.nabble.com/wstring-support-in-GCC-4.1.2-in-Cygwin-1.5.25-11-tp17275355p17359564.html
> Sent from the Cygwin list mailing list archive at
> Nabble.com.
> 
> 
> --
> Unsubscribe info:     
> http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:      
> http://cygwin.com/problems.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
> 
> 



      

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: wstring support in GCC 4.1.2 in Cygwin 1.5.25-11
  2008-05-21 22:58   ` Longyu Mei
@ 2008-05-22 10:27     ` jadooo
  0 siblings, 0 replies; 43+ messages in thread
From: jadooo @ 2008-05-22 10:27 UTC (permalink / raw)
  To: cygwin


Ya I am trying MinGW now. 

But since it is like building on the windows platform, we need to get round
with 
concepts which differ on the posix and the windows system. Currently I am 
dealing with the Signals, one such problem. In in my linux based code we
have used 
the sigaction() concept which is not supported in MinGW. 

Now I am bit worried to estimate the time for the complete activity as I
will 
have to make modifications in the code to make porting successful. 



Longyu Mei wrote:
> 
> How about minGW? Did you try that? I have similiar
> problem and I will try to see if there is any
> difference.
> 
> 
> --- jadooo <vnair@linx.co.uk> wrote:
> 
>> 
>> Thanks a lot for the valuable information.
>> 
>> I am trying to port my application developed in
>> linux to windows, now as
>> it is quiet clear that I could not use cygwin, due
>> to lack of Unicode
>> support,
>> is there any other alternative to try out my porting
>> activity.
>> 
>> Thanking you all once again for the great help.
>> 
>> Vipin
>> 
>> 
>> 
>> 
>> 
>> jadooo wrote:
>> > 
>> > Hi All,
>> > I was trying to compile my code on
>> Cygwin[1.5.25-11] with GCC[4.1.2], 
>> > but I am not able to build with errors on wstring.
>> 
>> >  
>> > I tried to test a simple application which uses
>> wstring, like
>> >  
>> > #include <string>
>> > #include <iostream>
>> > int main( ) 
>> > {
>> >    using namespace std;
>> >   
>> >  const basic_string <wchar_t> s1 ( L"abc" );
>> >    wstring s2 ( L"abc" );   // Uses the typedef
>> for wstring
>> >    if ( s1 == s2 )
>> >       cout << "The strings s1 & s2 are equal." <<
>> endl;
>> >    else
>> >       cout << "The strings s1 & s2 are not equal."
>> << endl;
>> > }
>> >  
>> > and on compiling I am getting the following
>> error..
>> >  
>> > -->g++ main.cpp -o main
>> > main.cpp: In function `int main()':
>> > main.cpp:8: error: `wstring' undeclared (first use
>> this function)
>> > main.cpp:8: error: (Each undeclared identifier is
>> reported only once for
>> > each fu
>> > nction it appears in.)
>> > main.cpp:8: error: expected `;' before "s2"
>> > main.cpp:9: error: `s2' undeclared (first use this
>> function)
>> >  
>> > I searched on the net but could not get any thing
>> recent or useful. Some
>> > old forum threads[2005] say that 
>> > it was not supported. 
>> >  
>> > Any advice or pointer will be of great help.
>> >  
>> > Thanks & Regards
>> > Vipin
>> > 
>> > 
>> 
>> -- 
>> View this message in context:
>>
> http://www.nabble.com/wstring-support-in-GCC-4.1.2-in-Cygwin-1.5.25-11-tp17275355p17359564.html
>> Sent from the Cygwin list mailing list archive at
>> Nabble.com.
>> 
>> 
>> --
>> Unsubscribe info:     
>> http://cygwin.com/ml/#unsubscribe-simple
>> Problem reports:      
>> http://cygwin.com/problems.html
>> Documentation:         http://cygwin.com/docs.html
>> FAQ:                   http://cygwin.com/faq/
>> 
>> 
> 
> 
> 
>       
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:       http://cygwin.com/problems.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/wstring-support-in-GCC-4.1.2-in-Cygwin-1.5.25-11-tp17275355p17399580.html
Sent from the Cygwin list mailing list archive at Nabble.com.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: wstring support in GCC 4.1.2 in Cygwin 1.5.25-11
  2008-05-21  2:02       ` Brian Dessent
@ 2008-05-22 14:32         ` jadooo
  2008-05-22 15:03           ` Larry Hall (Cygwin)
  2008-05-22 19:14         ` wstring support in GCC 4.1.2 (OS independent) Linda Walsh
  1 sibling, 1 reply; 43+ messages in thread
From: jadooo @ 2008-05-22 14:32 UTC (permalink / raw)
  To: cygwin


I just come across one article in google about UTF-8 Cygwin

http://www.okisoft.co.jp/esc/utf8-cygwin/

Just wanted to check about this. As per the documentation here
it says that the Cygwin it is providing will suport Unicode. 

Is it worth to go back and try this out. 


Brian Dessent wrote:
> 
> jadooo wrote:
> 
>> Please let me know if I am doing anything wrong.
> 
> Yes, you are misunderstanding the nature of the problem.
> 
> In order to support the wstring class, gcc relies on the platform's libc
> supporting wide character C99 functions.  newlib does not have the
> necessary support[1] so until that work is contributed, the wstring
> class cannot be enabled in libstdc++.  And even then, you'd have to
> rebuild libstdc++ which means rebuilding all of gcc.
> 
> Cygwin 1.7 currently contains support for unicode characters in
> filenames, but this is a far cry from general wide character string
> support (e.g. wprintf) so simply upgrading to 1.7 will not do anything. 
> Larry's suggestion that this will start working in 1.7 is premature,
> unless somebody contributes the necessary newlib improvements before 1.7
> is released.
> 
> Brian
> 
> [1] For a list of the missing features see
> http://cygwin.com/ml/cygwin-developers/2008-04/msg00094.html
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:       http://cygwin.com/problems.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/wstring-support-in-GCC-4.1.2-in-Cygwin-1.5.25-11-tp17275355p17405074.html
Sent from the Cygwin list mailing list archive at Nabble.com.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: wstring support in GCC 4.1.2 in Cygwin 1.5.25-11
  2008-05-22 14:32         ` jadooo
@ 2008-05-22 15:03           ` Larry Hall (Cygwin)
  2008-05-22 15:15             ` fate/resolution/location of things like "sys/sockio.h" Mike Marchywka
  0 siblings, 1 reply; 43+ messages in thread
From: Larry Hall (Cygwin) @ 2008-05-22 15:03 UTC (permalink / raw)
  To: cygwin

jadooo wrote:
> I just come across one article in google about UTF-8 Cygwin
> 
> http://www.okisoft.co.jp/esc/utf8-cygwin/
> 
> Just wanted to check about this. As per the documentation here
> it says that the Cygwin it is providing will suport Unicode. 
> 
> Is it worth to go back and try this out. 

You can try it out but it's important to keep in mind 2 things:

1. This is a patch that has not been accepted into CVS.  1.7.x is
    accomplishing the same thing by going a different path.

2. This patch still only affects cygwin1.dll.  There is no newlib
    patch.  So this doesn't get you any closer to your goal than the
    snapshot does.

-- 
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
216 Dalton Rd.                          (508) 893-9889 - FAX
Holliston, MA 01746

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* fate/resolution/location of things like "sys/sockio.h"
  2008-05-22 15:03           ` Larry Hall (Cygwin)
@ 2008-05-22 15:15             ` Mike Marchywka
  2008-05-22 16:36               ` Dave Korn
  0 siblings, 1 reply; 43+ messages in thread
From: Mike Marchywka @ 2008-05-22 15:15 UTC (permalink / raw)
  To: cygwin


Hi,
I'm trying to build nmap from scratch to track down some security issues.
It seems to be choking on this,
configure:4180: result: no
configure:4208: checking for sys/ioccom.h
configure:4216: result: no
configure:4104: checking sys/sockio.h usability
configure:4121: gcc -c -g -O2  conftest.c>&5
conftest.c:53:24: sys/sockio.h: No such file or directory
configure:4127: $? = 1
configure: failed program was:
| /* confdefs.h.  */

but I can't figure out exactly what the status of "sys/sockio.h" is from the results here:

http://www.google.com/search?hl=en&q=site%3Acygwin.com++%22sockio.h%22

Is there a definitive way to fix this? Some posts on non-cygwin sites but nothing
seems to get beyond "it didn't build what is wrong?"


Thanks.

Mike Marchywka
586 Saint James Walk
Marietta GA 30067-7165
404-788-1216 (C)<- leave message
989-348-4796 (P)<- emergency only
marchywka@hotmail.com
Note: If I am asking for free stuff, I normally use for hobby/non-profit
information but may use in investment forums, public and private.
Please indicate any concerns if applicable.
Note: Hotmail is possibly blocking my mom's entire
ISP - try  me on marchywka@yahoo.com if no reply
here. Thanks.


_________________________________________________________________
E-mail for the greater good. Join the i’m Initiative from Microsoft.
http://im.live.com/Messenger/IM/Join/Default.aspx?source=EML_WL_ GreaterGood

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* RE: fate/resolution/location of things like "sys/sockio.h"
  2008-05-22 15:15             ` fate/resolution/location of things like "sys/sockio.h" Mike Marchywka
@ 2008-05-22 16:36               ` Dave Korn
  2008-05-23  0:08                 ` Mike Marchywka
  0 siblings, 1 reply; 43+ messages in thread
From: Dave Korn @ 2008-05-22 16:36 UTC (permalink / raw)
  To: cygwin

Mike Marchywka wrote on 22 May 2008 16:03:

> but I can't figure out exactly what the status of "sys/sockio.h" is from
> the results here: 
> 
> http://www.google.com/search?hl=en&q=site%3Acygwin.com++%22sockio.h%22

  Wrong place to look, surely?

http://cygwin.com/cgi-bin2/package-grep.cgi?grep=sys%2Fsockio.h

> Is there a definitive way to fix this? 

  Fix what exactly?  The fact that cygwin doesn't supply or support
<sys/sockio.h>?  Well, yes, there is a definitive way to fix it:

http://cygwin.com/acronyms#PTC


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: wstring support in GCC 4.1.2 (OS independent)
  2008-05-21  2:02       ` Brian Dessent
  2008-05-22 14:32         ` jadooo
@ 2008-05-22 19:14         ` Linda Walsh
  2008-05-23  9:24           ` Brian Dessent
  1 sibling, 1 reply; 43+ messages in thread
From: Linda Walsh @ 2008-05-22 19:14 UTC (permalink / raw)
  To: cygwin

Brian Dessent wrote:
> jadooo wrote:
> 
>> Please let me know if I am doing anything wrong.
> 
> Yes, you are misunderstanding the nature of the problem.
> 
> In order to support the wstring class, gcc relies on the platform's libc
> supporting wide character C99 functions.
---
	Even though the "kernel" (cygwin 1.5) doesn't support unicode
shouldn't it be possible -- and desirable for gcc to support the
'wstring' datatype?

	It does seem 'wstring' is supported on standard linux,
but internally, the kernel doesn't support double-wide
characters anymore than cygwin.  So maybe the problem is
not that cygwin doesn't support unicode, but that the gcc
libs & compile utils don't support the standard linux
equivalents?

	Whether or not cygwin (or the linux kernel) supports
"wchar" is not entirely relevant to what the application libraries
on top of the kernel support -- at least going by the example
on an x86_64 linux.  It's still the case that the 64-bit
linux kernel doesn't support wchars any more than cygwin, yet
the compiler suite does.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: wstring support in GCC 4.1.2 in Cygwin 1.5.25-11
  2008-05-21 11:41 ` wstring support in GCC 4.1.2 in Cygwin 1.5.25-11 jadooo
  2008-05-21 22:58   ` Longyu Mei
@ 2008-05-22 21:48   ` Linda Walsh
  2008-05-23  3:01     ` Eric Blake
  1 sibling, 1 reply; 43+ messages in thread
From: Linda Walsh @ 2008-05-22 21:48 UTC (permalink / raw)
  To: jadooo, cygwin

jadooo wrote:
> Thanks a lot for the valuable information.
> 
> I am trying to port my application developed in linux to windows, now as
> it is quiet clear that I could not use cygwin, due to lack of Unicode
> support,
> is there any other alternative to try out my porting activity.
---
	Linux doesn't support double-wide characters in its
system calls -- it's all in 'glibc'.

	Cygwin doesn't need to support unicode anymore than
the linux kernel does.  It's whoever built the gcc/glib
packages that needs to supply that application-level (not
system-level) datatype.

	In the same way, gcc/glib supports 64-bit data types
on 32-bit machines and the glib file I/O transparently supports
64-bit file offsets even on 32-bit machines.

	But, AFAIK, glib doesn't support calling the standard
*nix file-io calls with 'wchar' comprised wstrings.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* RE: fate/resolution/location of things like "sys/sockio.h"
  2008-05-22 16:36               ` Dave Korn
@ 2008-05-23  0:08                 ` Mike Marchywka
  2008-05-23  0:10                   ` Christopher Faylor
  0 siblings, 1 reply; 43+ messages in thread
From: Mike Marchywka @ 2008-05-23  0:08 UTC (permalink / raw)
  To: cygwin


> From: dave.korn@artimi.com
> Date: Thu, 22 May 2008 16:15:16 +0100

Thanks. If you are interested, let me try to give a chronology of follow on events as best as I can
reconstruct:

1:::::::::::::::::::::::::::::::::::::::::::
> Wrong place to look, surely?
>
> http://cygwin.com/cgi-bin2/package-grep.cgi?grep=sys%2Fsockio.h

Oddly enough, that helped :)
OK, so I copied sockio.h and also needed ioccom.h. Just to be clear,

http://cygwin.com/cgi-bin/cvsweb.cgi/src/newlib/libc/sys/linux/sys/ioccom.h?cvsroot=src

my install is messed up so I'm not sure this problem applies to anyone else
but I'm just being complete incase it matters.

2:::::::::::::::::::::::::::::::::::::::::::::::

Then, I encountered a define problem. This seems to have occured elsewhere
so I thought I would post the issue with definition of ssize_t: 

http://code.google.com/p/xdelta/issues/detail?id=56

This turned out to be flagged with __CYGWIN__ and also easy to fix in the makefile.

3::::::::::::::::::::::::::::::::::::::::::::::::::::::

But, then I had a missing definition for IFF_POINTOPOINT which does seem to be 
an issue with cygwin. According to this, the symbol should be defined in if.h: 

https://www.linux-foundation.org/dbadmin/browse/headgroup.php?cmd=list-byheadgroup&HGid=437

my if.h needed to be modified, 

#define IFF_LOOPBACK    0x8             /* is a loopback net            */
//
#define IFF_POINTOPOINT    0x10            /* mjm,            */
// https://www.linux-foundation.org/dbadmin/browse/headgroup.php?cmd=list-byheadgroup&HGid=437

#define IFF_NOTRAILERS  0x20            /* avoid use of trailers        */

4: ::::::::::::::::::::::::::::::::::::::::::::
Next, a problem with INET6_ADDSTRLEN16. I found this and implemented the suggestion,


http://viral.media.mit.edu/peers/peers-win.html

#if defined(__CYGWIN__) 
#define INET_ADDRSTRLEN 16 
#define INET6_ADDRSTRLEN 46 
#endif /* __CYGWIN__ */

which again seemed to work but I have no idea what other problems may turn up if this isn't right.

5::::::::::::::::::::::::::::::::::::::::::::

Then I finally encountered a big link problem and determined that some pieces
were built with and without -mno-cygwin. I was finally able to stop it from complaining
by grepping all the libraries for the missing symbols and just randomly adding stuff
but, duh, the executable wouldn't run. I can probably figure this out but I've never built anything with -mno-cygwin before
so it will probably take a while.



Thanks. 




Mike Marchywka
586 Saint James Walk
Marietta GA 30067-7165
404-788-1216 (C)<- leave message
989-348-4796 (P)<- emergency only
marchywka@hotmail.com
Note: If I am asking for free stuff, I normally use for hobby/non-profit
information but may use in investment forums, public and private.
Please indicate any concerns if applicable.
Note: Hotmail is possibly blocking my mom's entire
ISP - try  me on marchywka@yahoo.com if no reply
here. Thanks.


> From: dave.korn@artimi.com
> To: cygwin@cygwin.com
> Subject: RE: fate/resolution/location of things like "sys/sockio.h"
> Date: Thu, 22 May 2008 16:15:16 +0100
>
> Mike Marchywka wrote on 22 May 2008 16:03:
>
>> but I can't figure out exactly what the status of "sys/sockio.h" is from
>> the results here:
>>
>> http://www.google.com/search?hl=en&q=site%3Acygwin.com++%22sockio.h%22
>
> Wrong place to look, surely?
>
> http://cygwin.com/cgi-bin2/package-grep.cgi?grep=sys%2Fsockio.h
>
>> Is there a definitive way to fix this?
>
> Fix what exactly? The fact that cygwin doesn't supply or support
> ? Well, yes, there is a definitive way to fix it:
>
> http://cygwin.com/acronyms#PTC
>
>
> cheers,
> DaveK
> --
> Can't think of a witty .sigline today....
>
>
> --
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
> Problem reports: http://cygwin.com/problems.html
> Documentation: http://cygwin.com/docs.html
> FAQ: http://cygwin.com/faq/
>

_________________________________________________________________
Give to a good cause with every e-mail. Join the i’m Initiative from Microsoft.
http://im.live.com/Messenger/IM/Join/Default.aspx?souce=EML_WL_ GoodCause

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: fate/resolution/location of things like "sys/sockio.h"
  2008-05-23  0:08                 ` Mike Marchywka
@ 2008-05-23  0:10                   ` Christopher Faylor
  2008-05-26 22:00                     ` Mike Marchywka
  0 siblings, 1 reply; 43+ messages in thread
From: Christopher Faylor @ 2008-05-23  0:10 UTC (permalink / raw)
  To: cygwin

On Thu, May 22, 2008 at 05:48:14PM -0400, Mike Marchywka wrote:
>> From: dave.korn@artimi.com
>> Date: Thu, 22 May 2008 16:15:16 +0100
>
>Thanks. If you are interested, let me try to give a chronology of follow on events as best as I can
>reconstruct:
>
>1:::::::::::::::::::::::::::::::::::::::::::
>> Wrong place to look, surely?
>>
>> http://cygwin.com/cgi-bin2/package-grep.cgi?grep=sys%2Fsockio.h
>
>Oddly enough, that helped :)
>OK, so I copied sockio.h and also needed ioccom.h. Just to be clear,
>
>http://cygwin.com/cgi-bin/cvsweb.cgi/src/newlib/libc/sys/linux/sys/ioccom.h?cvsroot=src
>
>my install is messed up so I'm not sure this problem applies to anyone else
>but I'm just being complete incase it matters.

As the sys/linux above implies, this is linux-specific code.  It has no
bearing for cygwin.

>2:::::::::::::::::::::::::::::::::::::::::::::::
>
>Then, I encountered a define problem. This seems to have occured elsewhere
>so I thought I would post the issue with definition of ssize_t: 
>
>http://code.google.com/p/xdelta/issues/detail?id=56
>
>This turned out to be flagged with __CYGWIN__ and also easy to fix in the makefile.
>
>3::::::::::::::::::::::::::::::::::::::::::::::::::::::
>
>But, then I had a missing definition for IFF_POINTOPOINT which does seem to be 
>an issue with cygwin. According to this, the symbol should be defined in if.h: 
>
>https://www.linux-foundation.org/dbadmin/browse/headgroup.php?cmd=list-byheadgroup&HGid=437
>
>my if.h needed to be modified, 
>
>#define IFF_LOOPBACK    0x8             /* is a loopback net            */
>//
>#define IFF_POINTOPOINT    0x10            /* mjm,            */
>// https://www.linux-foundation.org/dbadmin/browse/headgroup.php?cmd=list-byheadgroup&HGid=437
>
>#define IFF_NOTRAILERS  0x20            /* avoid use of trailers        */
>
>4: ::::::::::::::::::::::::::::::::::::::::::::
>Next, a problem with INET6_ADDSTRLEN16. I found this and implemented the suggestion,
>
>
>http://viral.media.mit.edu/peers/peers-win.html
>
>#if defined(__CYGWIN__) 
>#define INET_ADDRSTRLEN 16 
>#define INET6_ADDRSTRLEN 46 
>#endif /* __CYGWIN__ */
>
>which again seemed to work but I have no idea what other problems may turn up if this isn't right.
>
>5::::::::::::::::::::::::::::::::::::::::::::
>
>Then I finally encountered a big link problem and determined that some
>pieces were built with and without -mno-cygwin.  I was finally able to
>stop it from complaining by grepping all the libraries for the missing
>symbols and just randomly adding stuff but, duh, the executable
>wouldn't run.  I can probably figure this out but I've never built
>anything with -mno-cygwin before so it will probably take a while.

Sorry but you're very confused by this point.  Compiling with -mno-cygwin means
that you can't use ANY cygwin headers.  You won't be able to create an executable
which works this way.

When Dave said "...cygwin doesn't supply or support <sys/sockio.h>" he wasn't
kidding.  It isn't supplied and copying it from a random source and randomly
making changes is not going to work.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: wstring support in GCC 4.1.2 in Cygwin 1.5.25-11
  2008-05-22 21:48   ` Linda Walsh
@ 2008-05-23  3:01     ` Eric Blake
  2008-05-23 19:26       ` Linda Walsh
  0 siblings, 1 reply; 43+ messages in thread
From: Eric Blake @ 2008-05-23  3:01 UTC (permalink / raw)
  To: cygwin

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Linda Walsh on 5/22/2008 1:14 PM:
|     Linux doesn't support double-wide characters in its
| system calls -- it's all in 'glibc'.
|
|     Cygwin doesn't need to support unicode anymore than
| the linux kernel does.  It's whoever built the gcc/glib
| packages that needs to supply that application-level (not
| system-level) datatype.

Please get your terms straight.  glib is something MUCH different than
glibc.  glib is ported to cygwin, glibc is not.  glib is a graphics
library, glibc is an implementation of libc.  Cygwin uses newlib as its
implementation of libc.  And that's why cygwin doesn't support wstring -
because newlib does not have very complete wide character support.

But you are correct that it is the job of libc, and not the kernel, to
provide application-level code that interprets byte sequences as wide
characters.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkg2IoMACgkQ84KuGfSFAYDXtQCeI20yMSPSKhvW2wdRhiZfSm3V
usIAoKJ/i0GgKQJeVfPJSt92y+fe8VAB
=hwpH
-----END PGP SIGNATURE-----

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: wstring support in GCC 4.1.2 (OS independent)
  2008-05-22 19:14         ` wstring support in GCC 4.1.2 (OS independent) Linda Walsh
@ 2008-05-23  9:24           ` Brian Dessent
  0 siblings, 0 replies; 43+ messages in thread
From: Brian Dessent @ 2008-05-23  9:24 UTC (permalink / raw)
  To: cygwin

Linda Walsh wrote:

> So maybe the problem is
> not that cygwin doesn't support unicode, but that the gcc
> libs & compile utils don't support the standard linux
> equivalents?

I can't parse this.

>         Whether or not cygwin (or the linux kernel) supports
> "wchar" is not entirely relevant to what the application libraries
> on top of the kernel support -- at least going by the example
> on an x86_64 linux.  It's still the case that the 64-bit
> linux kernel doesn't support wchars any more than cygwin, yet
> the compiler suite does.

Comparing Cygwin to the linux kernel is nonsense.  They serve totally
different purposes -- Cygwin is a user-mode library.  If you want to
make a comparison, compare Cygwin to glibc as they are both libcs.

And again, the compiler suite cannot implement wstring without
underlying libc wide character IO support which does not exist in newlib
and therefore does not exist in Cygwin.  Remember that gcc is divorced
from the target libc because a libc is way too OS-dependent.  gcc relies
on the platform to implement its own libc, and everything gcc implements
builds on top of an existing libc.  If the libc doesn't have the
necessary support there's nothing that libstdc++ can do about it but
disable wstring.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: wstring support in GCC 4.1.2 in Cygwin 1.5.25-11
  2008-05-23  3:01     ` Eric Blake
@ 2008-05-23 19:26       ` Linda Walsh
  2008-05-23 20:30         ` Christopher Faylor
  0 siblings, 1 reply; 43+ messages in thread
From: Linda Walsh @ 2008-05-23 19:26 UTC (permalink / raw)
  To: cygwin

Eric Blake wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> According to Linda Walsh on 5/22/2008 1:14 PM:
> |     Linux doesn't support double-wide characters in its
> | system calls -- it's all in 'glibc'.
> |
> |     Cygwin doesn't need to support unicode anymore than
> | the linux kernel does.  It's whoever built the gcc/glib
> | packages that needs to supply that application-level (not
> | system-level) datatype.
> 
> Please get your terms straight.  glib is something MUCH different than
> glibc.  glib is ported to cygwin, glibc is not.  glib is a graphics
> library, glibc is an implementation of libc.  Cygwin uses newlib as its
> implementation of libc.  And that's why cygwin doesn't support wstring -
> because newlib does not have very complete wide character support.
---
	Where did 'newlib' come from?  I "thought", that newlib had
originally been designed as a 'bootstrapping' library in order to get
some minimal and widely used set of gnu-library functions up and running
so other gnu utils could also get "up & running".

	Wasn't it planned to bring in the full glibc at one point? --
and sorry for my terminology -- I'm often a lazy typist -- my typing
isn't what it used to be -- due to nerve impingements...I usually do
ok, but it depends on how much I've pushed, how tired or taxed I am...
I knew the correct name of glibc -- as put in quotes in the first
sentence...was latter on in 'backrefs', I got more lazy...sigh
l



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: wstring support in GCC 4.1.2 in Cygwin 1.5.25-11
  2008-05-23 19:26       ` Linda Walsh
@ 2008-05-23 20:30         ` Christopher Faylor
  0 siblings, 0 replies; 43+ messages in thread
From: Christopher Faylor @ 2008-05-23 20:30 UTC (permalink / raw)
  To: cygwin

On Fri, May 23, 2008 at 11:40:35AM -0700, Linda Walsh wrote:
> Eric Blake wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>> According to Linda Walsh on 5/22/2008 1:14 PM:
>> |     Linux doesn't support double-wide characters in its
>> | system calls -- it's all in 'glibc'.
>> |
>> |     Cygwin doesn't need to support unicode anymore than
>> | the linux kernel does.  It's whoever built the gcc/glib
>> | packages that needs to supply that application-level (not
>> | system-level) datatype.
>> Please get your terms straight.  glib is something MUCH different than
>> glibc.  glib is ported to cygwin, glibc is not.  glib is a graphics
>> library, glibc is an implementation of libc.  Cygwin uses newlib as its
>> implementation of libc.  And that's why cygwin doesn't support wstring -
>> because newlib does not have very complete wide character support.
>
>Where did 'newlib' come from?  I "thought", that newlib had originally
>been designed as a 'bootstrapping' library in order to get some minimal
>and widely used set of gnu-library functions up and running so other
>gnu utils could also get "up & running".

Either check out the newlib web site at http://sourceware.org/newlib or
ask about newlib in the newlib mailing list.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* RE: fate/resolution/location of things like "sys/sockio.h"
  2008-05-23  0:10                   ` Christopher Faylor
@ 2008-05-26 22:00                     ` Mike Marchywka
  2008-05-27  9:12                       ` Brian Dessent
  0 siblings, 1 reply; 43+ messages in thread
From: Mike Marchywka @ 2008-05-26 22:00 UTC (permalink / raw)
  To: cygwin




Thanks but now another issue. To review, I'm trying to build nmap and had some problems with
the generated configuration. I decided to compile everything as cygwin c++ and remove the fancy
linking( "ar cru" all the .o files into "junkbin.a" , fixing extern C, no "no-cygwin",  and related problems etc). 
I ended up with a link command and cygcheck as shown below but I'm more
interested in getting a tool to diagnose the problem. Windoze would give some info
if you click on it but now just says it didn't initialize, since it doesn't get to "main" gdb just
gives up. Thanks.



$ g++  nmapjunk.a libdnet-stripped/src/junkbin.a liblua/junkbin.a  -Lnbase -lnbase -Lnsock/src -lnsock -Llibpcap -lpcap  -liphlpapi -lws2_32 -lpcre -L. -lPacket

Info: resolving _optind by linking to __imp__optind (auto-import)
Info: resolving _optarg by linking to __imp__optarg (auto-import)
Info: resolving _pcre_free by linking to __imp__pcre_free (auto-import)


$ cygcheck -v ./a.exe |  grep -v "already done" | uniq | unix2dos>



Warning: .\a.exe hides e:\new\temp\nmap\src3\nmap-4.62\a.exe
.\a.exe - os=4.0 img=1.0 sys=4.0
  C:\WINNT\cygwin1.dll - os=4.0 img=1.0 sys=4.0
    "cygwin1.dll" v0.0 ts=2007/1/31 4:58
    C:\WINNT\system32\ADVAPI32.DLL - os=5.0 img=5.0 sys=4.0
      "ADVAPI32.dll" v0.0 ts=2005/4/11 17:31
      C:\WINNT\system32\KERNEL32.dll - os=5.0 img=5.0 sys=4.0
        "KERNEL32.dll" v0.0 ts=2006/6/21 1:26
        C:\WINNT\system32\ntdll.dll - os=5.0 img=5.0 sys=4.0
          "ntdll.dll" v0.0 ts=2004/12/2 21:40
      C:\WINNT\system32\RPCRT4.dll - os=5.0 img=5.0 sys=4.10
        "RPCRT4.dll" v0.0 ts=2006/4/13 0:31
        C:\WINNT\system32\ADVAPI32.dll (recursive)
Warning: .\cygpcre-0.dll hides e:\new\temp\nmap\src3\nmap-4.62\cygpcre-0.dll
Warning: .\cygpcre-0.dll hides C:\MiscPrograms\cygwin\cyg\bin\cygpcre-0.dll
  .\cygpcre-0.dll - os=4.0 img=1.0 sys=4.0
    "cygpcre-0.dll" v0.0 ts=2007/6/26 23:49
  C:\WINNT\system32\IPHLPAPI.DLL - os=5.0 img=5.0 sys=4.10
    "iphlpapi.dll" v0.0 ts=2006/5/19 3:59
    C:\WINNT\system32\MSVCRT.dll - os=4.0 img=0.0 sys=4.0
      "MSVCRT.dll" v0.0 ts=2003/3/11 4:10
    C:\WINNT\system32\USER32.dll - os=5.0 img=5.0 sys=4.0
      "USER32.dll" v0.0 ts=2005/4/11 17:31
      C:\WINNT\system32\GDI32.dll - os=5.0 img=5.0 sys=4.10
        "GDI32.dll" v0.0 ts=2005/12/29 7:28
        C:\WINNT\system32\USER32.dll (recursive)
    C:\WINNT\system32\WS2_32.dll - os=5.0 img=5.0 sys=4.10
      "WS2_32.dll" v0.0 ts=2002/8/16 4:58
      C:\WINNT\system32\WS2HELP.DLL - os=5.0 img=5.0 sys=4.0
        "WS2HELP.dll" v0.0 ts=1999/9/25 1:17
    C:\WINNT\system32\ICMP.dll - os=5.0 img=5.0 sys=4.0
      "ICMP.dll" v0.0 ts=1999/9/25 1:19
    C:\WINNT\system32\MPRAPI.dll - os=5.0 img=5.0 sys=4.10
      "MPRAPI.dll" v0.0 ts=1999/11/12 18:24
      C:\WINNT\system32\SAMLIB.DLL - os=5.0 img=5.0 sys=4.0
        "SAMLIB.dll" v0.0 ts=2005/4/1 20:23
      C:\WINNT\system32\NETAPI32.DLL - os=5.0 img=5.0 sys=4.0
        "NETAPI32.dll" v0.0 ts=2006/8/17 7:46
        C:\WINNT\system32\Secur32.dll - os=5.0 img=5.0 sys=4.0
          "Secur32.dll" v0.0 ts=2003/3/26 16:37
        C:\WINNT\system32\NTDSAPI.dll - os=5.0 img=5.0 sys=4.10
          "NTDSAPI.dll" v0.0 ts=2003/2/18 11:59
          C:\WINNT\system32\DNSAPI.DLL - os=5.0 img=5.0 sys=4.0
            "DNSAPI.dll" v0.0 ts=2006/6/27 3:30
            C:\WINNT\system32\WSOCK32.dll - os=5.0 img=5.0 sys=4.10
              "WSOCK32.dll" v0.0 ts=2002/9/5 16:55
          C:\WINNT\system32\WLDAP32.DLL - os=5.0 img=5.0 sys=4.0
            "WLDAP32.dll" v0.0 ts=2005/4/1 20:23
          C:\WINNT\system32\NETAPI32.DLL (recursive)
        C:\WINNT\system32\NETRAP.dll - os=5.0 img=5.0 sys=4.10
          "NETRAP.dll" v0.0 ts=1999/9/25 1:03
      C:\WINNT\system32\OLE32.DLL - os=5.0 img=5.0 sys=4.0
        "ole32.dll" v0.0 ts=2005/7/5 13:08
      C:\WINNT\system32\OLEAUT32.DLL - os=4.0 img=0.0 sys=4.0
        "OLEAUT32.dll" v0.0 ts=2002/12/12 16:28
      C:\WINNT\system32\ACTIVEDS.DLL - os=5.0 img=5.0 sys=4.0
        "ACTIVEDS.dll" v0.0 ts=2002/8/16 6:26
        C:\WINNT\system32\ADSLDPC.DLL - os=5.0 img=5.0 sys=4.0
          "adsldpc.dll" v0.0 ts=2005/4/1 20:23
      C:\WINNT\system32\RTUTILS.DLL - os=5.0 img=5.0 sys=4.10
        "rtutils.dll" v0.0 ts=1999/10/30 18:31
      C:\WINNT\system32\SETUPAPI.DLL - os=5.0 img=5.0 sys=4.0
        "SETUPAPI.dll" v0.0 ts=2002/12/5 17:13
        C:\WINNT\system32\USERENV.DLL - os=5.0 img=5.0 sys=4.0
          "USERENV.dll" v0.0 ts=2005/4/1 20:23
    C:\WINNT\system32\RASAPI32.dll - os=5.0 img=5.0 sys=4.0
      "RASAPI32.dll" v0.0 ts=2005/4/1 20:23
      C:\WINNT\system32\rasman.dll - os=5.0 img=5.0 sys=4.0
        "rasman.dll" v0.0 ts=2005/4/1 20:23
      C:\WINNT\system32\TAPI32.dll - os=5.0 img=5.0 sys=4.0
        "TAPI32.dll" v0.0 ts=2003/2/14 18:16
        C:\WINNT\system32\COMCTL32.DLL - os=5.0 img=5.0 sys=4.0
          "COMCTL32.dll" v0.0 ts=2006/8/25 11:12
        C:\WINNT\system32\SHLWAPI.DLL - os=5.1 img=5.1 sys=4.0
          "SHLWAPI.dll" v0.0 ts=2006/10/23 12:53
    C:\WINNT\system32\DHCPCSVC.DLL - os=5.0 img=5.0 sys=4.0
      "DHCPCSVC.DLL" v0.0 ts=2006/4/13 6:07
      C:\WINNT\system32\iphlpapi.dll (recursive)
Warning: .\packet.dll hides e:\new\temp\nmap\src3\nmap-4.62\packet.dll
Warning: .\packet.dll hides C:\WINNT\system32\packet.dll
  .\packet.dll - os=4.0 img=0.0 sys=4.0
    "packet.dll" v0.0 ts=2005/8/2 17:08
    C:\WINNT\system32\WanPacket.dll - os=4.0 img=0.0 sys=4.0
      "WanPacket.dll" v0.0 ts=2005/8/2 17:08
      C:\WINNT\system32\NPPTools.dll - os=5.0 img=1.0 sys=4.0
        "NPPTools.dll" v0.0 ts=1999/9/25 1:28
        C:\WINNT\system32\MFC42u.DLL - os=4.0 img=6.0 sys=4.0
          "MFC42u.DLL" v0.0 ts=2002/10/29 16:36
    C:\WINNT\system32\VERSION.dll - os=5.0 img=5.0 sys=4.0
      "VERSION.dll" v0.0 ts=2002/12/10 14:41
      C:\WINNT\system32\LZ32.DLL - os=5.0 img=5.0 sys=4.10
        "LZ32.dll" v0.0 ts=2002/10/14 19:27
Warning: .\cygpcre-0.dll hides e:\new\temp\nmap\src3\nmap-4.62\cygpcre-0.dll
Warning: .\cygpcre-0.dll hides C:\MiscPrograms\cygwin\cyg\bin\cygpcre-0.dll
Warning: .\cygpcre-0.dll hides e:\new\temp\nmap\src3\nmap-4.62\cygpcre-0.dll
Warning: .\cygpcre-0.dll hides C:\MiscPrograms\cygwin\cyg\bin\cygpcre-0.dll
Warning: .\cygpcre-0.dll hides e:\new\temp\nmap\src3\nmap-4.62\cygpcre-0.dll
Warning: .\cygpcre-0.dll hides C:\MiscPrograms\cygwin\cyg\bin\cygpcre-0.dll
Warning: .\cygpcre-0.dll hides e:\new\temp\nmap\src3\nmap-4.62\cygpcre-0.dll
Warning: .\cygpcre-0.dll hides C:\MiscPrograms\cygwin\cyg\bin\cygpcre-0.dll
Warning: .\cygpcre-0.dll hides e:\new\temp\nmap\src3\nmap-4.62\cygpcre-0.dll
Warning: .\cygpcre-0.dll hides C:\MiscPrograms\cygwin\cyg\bin\cygpcre-0.dll
Warning: .\cygpcre-0.dll hides e:\new\temp\nmap\src3\nmap-4.62\cygpcre-0.dll
Warning: .\cygpcre-0.dll hides C:\MiscPrograms\cygwin\cyg\bin\cygpcre-0.dll
Warning: .\cygpcre-0.dll hides e:\new\temp\nmap\src3\nmap-4.62\cygpcre-0.dll
Warning: .\cygpcre-0.dll hides C:\MiscPrograms\cygwin\cyg\bin\cygpcre-0.dll


If it helps any, this program works just fine ( although it doesn't always seem to run the first try
after a reboot?). 

$ cygcheck -v ./main.exe | grep -v "already done"
Warning: .\main.exe hides e:\new\glutp\glutp\glutp\main.exe
.\main.exe - os=4.0 img=1.0 sys=4.0
  C:\WINNT\cygwin1.dll - os=4.0 img=1.0 sys=4.0
    "cygwin1.dll" v0.0 ts=2007/1/31 4:58
    C:\WINNT\system32\ADVAPI32.DLL - os=5.0 img=5.0 sys=4.0
      "ADVAPI32.dll" v0.0 ts=2005/4/11 17:31
      C:\WINNT\system32\KERNEL32.dll - os=5.0 img=5.0 sys=4.0
        "KERNEL32.dll" v0.0 ts=2006/6/21 1:26
        C:\WINNT\system32\ntdll.dll - os=5.0 img=5.0 sys=4.0
          "ntdll.dll" v0.0 ts=2004/12/2 21:40
      C:\WINNT\system32\RPCRT4.dll - os=5.0 img=5.0 sys=4.10
        "RPCRT4.dll" v0.0 ts=2006/4/13 0:31
        C:\WINNT\system32\ADVAPI32.dll (recursive)
  C:\MiscPrograms\cygwin\cyg\bin\cygjpeg-62.dll - os=4.0 img=1.0 sys=4.0
    "cygjpeg-62.dll" v0.0 ts=2006/11/9 4:02
  C:\WINNT\system32\GLU32.DLL - os=5.0 img=5.0 sys=4.10
    "GLU32.dll" v0.0 ts=1999/9/25 0:21
    C:\WINNT\system32\MSVCRT.dll - os=4.0 img=0.0 sys=4.0
      "MSVCRT.dll" v0.0 ts=2003/3/11 4:10
    C:\WINNT\system32\OPENGL32.dll - os=5.0 img=5.0 sys=4.10
      "OPENGL32.dll" v0.0 ts=2002/10/17 16:35
      C:\WINNT\system32\GDI32.dll - os=5.0 img=5.0 sys=4.10
        "GDI32.dll" v0.0 ts=2005/12/29 7:28
        C:\WINNT\system32\USER32.dll - os=5.0 img=5.0 sys=4.0
          "USER32.dll" v0.0 ts=2005/4/11 17:31
          C:\WINNT\system32\GDI32.dll (recursive)
      C:\WINNT\system32\GLU32.dll (recursive)
      C:\WINNT\system32\DDRAW.dll - os=5.1 img=5.1 sys=4.0
        "DDRAW.dll" v0.0 ts=2004/7/9 3:32
        C:\WINNT\system32\DCIMAN32.dll - os=5.0 img=5.0 sys=4.10
          "DCIMAN32.dll" v0.0 ts=1999/11/11 21:48
Warning: C:\MiscPrograms\cygwin\cyg\bin\glut32.dll hides c:\MyDocs\scripts\glut3
2.dll
  C:\MiscPrograms\cygwin\cyg\bin\glut32.dll - os=4.0 img=3.7 sys=4.0
    "glut32.dll" v0.0 ts=2003/11/10 17:24
    C:\WINNT\system32\WINMM.dll - os=5.0 img=5.0 sys=4.0
      "WINMM.dll" v0.0 ts=1999/10/23 17:20




Mike Marchywka
586 Saint James Walk
Marietta GA 30067-7165
404-788-1216 (C)<- leave message
989-348-4796 (P)<- emergency only
marchywka@hotmail.com
Note: If I am asking for free stuff, I normally use for hobby/non-profit
information but may use in investment forums, public and private.
Please indicate any concerns if applicable.
Note: Hotmail is possibly blocking my mom's entire
ISP - try  me on marchywka@yahoo.com if no reply
here. Thanks.


_________________________________________________________________
Give to a good cause with every e-mail. Join the i’m Initiative from Microsoft.
http://im.live.com/Messenger/IM/Join/Default.aspx?souce=EML_WL_ GoodCause

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: fate/resolution/location of things like "sys/sockio.h"
  2008-05-26 22:00                     ` Mike Marchywka
@ 2008-05-27  9:12                       ` Brian Dessent
  2008-05-27 13:20                         ` Mike Marchywka
  0 siblings, 1 reply; 43+ messages in thread
From: Brian Dessent @ 2008-05-27  9:12 UTC (permalink / raw)
  To: Mike Marchywka; +Cc: cygwin

Mike Marchywka wrote:

> $ g++  nmapjunk.a libdnet-stripped/src/junkbin.a liblua/junkbin.a  -Lnbase -lnbase -Lnsock/src -lnsock -Llibpcap -lpcap  -liphlpapi -lws2_32 -lpcre -L. -lPacket

I would not expect this to work in any case.  Cygwin has no libpcap, so
you must be using the native windows winpcap, which is not a Cygwin
library (it's linked with MSVCRT.)

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* RE: fate/resolution/location of things like "sys/sockio.h"
  2008-05-27  9:12                       ` Brian Dessent
@ 2008-05-27 13:20                         ` Mike Marchywka
  2008-05-27 13:57                           ` Mike Marchywka
  2008-05-28 15:00                           ` MS or cygwin dll debug tools/ was "sys/sockio.h" etc Mike Marchywka
  0 siblings, 2 replies; 43+ messages in thread
From: Mike Marchywka @ 2008-05-27 13:20 UTC (permalink / raw)
  To: cygwin


> Date: Tue, 27 May 2008 00:54:37 -0700
> From: brian@dessent.net
> Mike Marchywka wrote:
>
>> $ g++ nmapjunk.a libdnet-stripped/src/junkbin.a liblua/junkbin.a -Lnbase -lnbase -Lnsock/src -lnsock -Llibpcap -lpcap -liphlpapi -lws2_32 -lpcre -L. -lPacket
>
> I would not expect this to work in any case. Cygwin has no libpcap, so
> you must be using the native windows winpcap, which is not a Cygwin
> library (it's linked with MSVCRT.)
>

I have winpcap for an earlier install of ShowTraffic which runs fine. The nmap download
comes with its own and getting everything consistent may be a problem but I can't
come up with a diagnostic that confirms death during packet.dll load. I guess that is
why I am more interested in diagnostic tools rather than expecting to find someone who
knows offhand how to link my c++ version of nmap :)

Is there some simple way to get gdb to tell you what it was trying to do if it dies before getting
to main()? From what I could tell, you couldn't set a break point etc to diagnose the 
CRT initialization stuff. As far as that goes, what tools are there for dumping object or "a" files?


Thanks.




Mike Marchywka
586 Saint James Walk
Marietta GA 30067-7165
404-788-1216 (C)<- leave message
989-348-4796 (P)<- emergency only
marchywka@hotmail.com
Note: If I am asking for free stuff, I normally use for hobby/non-profit
information but may use in investment forums, public and private.
Please indicate any concerns if applicable.
Note: Hotmail is possibly blocking my mom's entire
ISP - try  me on marchywka@yahoo.com if no reply
here. Thanks.


> Date: Tue, 27 May 2008 00:54:37 -0700
> From: brian@dessent.net
> To: marchywka@hotmail.com
> CC: cygwin@cygwin.com
> Subject: Re: fate/resolution/location of things like "sys/sockio.h"
>
> Mike Marchywka wrote:
>
>> $ g++ nmapjunk.a libdnet-stripped/src/junkbin.a liblua/junkbin.a -Lnbase -lnbase -Lnsock/src -lnsock -Llibpcap -lpcap -liphlpapi -lws2_32 -lpcre -L. -lPacket
>
> I would not expect this to work in any case. Cygwin has no libpcap, so
> you must be using the native windows winpcap, which is not a Cygwin
> library (it's linked with MSVCRT.)
>
> Brian
>
> --
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
> Problem reports: http://cygwin.com/problems.html
> Documentation: http://cygwin.com/docs.html
> FAQ: http://cygwin.com/faq/
>

_________________________________________________________________
Make every e-mail and IM count. Join the i’m Initiative from Microsoft.
http://im.live.com/Messenger/IM/Join/Default.aspx?source=EML_WL_ MakeCount

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* RE: fate/resolution/location of things like "sys/sockio.h"
  2008-05-27 13:20                         ` Mike Marchywka
@ 2008-05-27 13:57                           ` Mike Marchywka
  2008-05-27 14:05                             ` Brian Dessent
  2008-05-27 17:12                             ` Phil Betts
  2008-05-28 15:00                           ` MS or cygwin dll debug tools/ was "sys/sockio.h" etc Mike Marchywka
  1 sibling, 2 replies; 43+ messages in thread
From: Mike Marchywka @ 2008-05-27 13:57 UTC (permalink / raw)
  To: cygwin



Also, FWIW, I took a sample program in wpdpack and compiled it WITH cygwin
( all the makefiles that came with the download did use -mno-cygwin ) 
and it at least loaded ( it may function properly  but I haven't checked),

$ cygcheck ./pktdump_ex.exe | sed -e 's/ /./g'
.\pktdump_ex.exe
..C:\WINNT\system32\wpcap.dll
....C:\WINNT\system32\KERNEL32.dll
......C:\WINNT\system32\ntdll.dll
....C:\WINNT\system32\WS2_32.dll
......C:\WINNT\system32\MSVCRT.DLL
......C:\WINNT\system32\ADVAPI32.DLL
........C:\WINNT\system32\RPCRT4.dll
......C:\WINNT\system32\WS2HELP.DLL
....C:\WINNT\system32\packet.dll
......C:\WINNT\system32\WanPacket.dll
........C:\WINNT\system32\NPPTools.dll
..........C:\WINNT\system32\MFC42u.DLL
............C:\WINNT\system32\GDI32.dll
..............C:\WINNT\system32\USER32.dll
..........C:\WINNT\system32\OLEAUT32.dll
............C:\WINNT\system32\ole32.dll
......C:\WINNT\system32\iphlpapi.dll
........C:\WINNT\system32\ICMP.dll
........C:\WINNT\system32\MPRAPI.dll
..........C:\WINNT\system32\SAMLIB.DLL
..........C:\WINNT\system32\NETAPI32.DLL
............C:\WINNT\system32\Secur32.dll
............C:\WINNT\system32\NTDSAPI.dll
..............C:\WINNT\system32\DNSAPI.DLL
................C:\WINNT\system32\WSOCK32.dll
..............C:\WINNT\system32\WLDAP32.DLL
............C:\WINNT\system32\NETRAP.dll
..........C:\WINNT\system32\ACTIVEDS.DLL
............C:\WINNT\system32\ADSLDPC.DLL
..........C:\WINNT\system32\RTUTILS.DLL
..........C:\WINNT\system32\SETUPAPI.DLL
............C:\WINNT\system32\USERENV.DLL
........C:\WINNT\system32\RASAPI32.dll
..........C:\WINNT\system32\rasman.dll
..........C:\WINNT\system32\TAPI32.dll
............C:\WINNT\system32\COMCTL32.DLL
............C:\WINNT\system32\SHLWAPI.DLL
........C:\WINNT\system32\DHCPCSVC.DLL
......C:\WINNT\system32\VERSION.dll
........C:\WINNT\system32\LZ32.DLL
..C:\WINNT\cygwin1.dll


$ ./pktdump_ex.exe
pktdump_ex: prints the packets of the network using WinPcap.
   Usage: pktdump_ex [-s source]




Mike Marchywka
586 Saint James Walk
Marietta GA 30067-7165
404-788-1216 (C)<- leave message
989-348-4796 (P)<- emergency only
marchywka@hotmail.com
Note: If I am asking for free stuff, I normally use for hobby/non-profit
information but may use in investment forums, public and private.
Please indicate any concerns if applicable.
Note: Hotmail is possibly blocking my mom's entire
ISP - try  me on marchywka@yahoo.com if no reply
here. Thanks.


> From: marchywka@hotmail.com
> To: cygwin@cygwin.com
> Subject: RE: fate/resolution/location of things like "sys/sockio.h"
> Date: Tue, 27 May 2008 07:03:55 -0400
>
>
>> Date: Tue, 27 May 2008 00:54:37 -0700
>> From: brian@dessent.net
>> Mike Marchywka wrote:
>>
>>> $ g++ nmapjunk.a libdnet-stripped/src/junkbin.a liblua/junkbin.a -Lnbase -lnbase -Lnsock/src -lnsock -Llibpcap -lpcap -liphlpapi -lws2_32 -lpcre -L. -lPacket
>>
>> I would not expect this to work in any case. Cygwin has no libpcap, so
>> you must be using the native windows winpcap, which is not a Cygwin
>> library (it's linked with MSVCRT.)
>>
>
> I have winpcap for an earlier install of ShowTraffic which runs fine. The nmap download
> comes with its own and getting everything consistent may be a problem but I can't
> come up with a diagnostic that confirms death during packet.dll load. I guess that is
> why I am more interested in diagnostic tools rather than expecting to find someone who
> knows offhand how to link my c++ version of nmap :)
>
> Is there some simple way to get gdb to tell you what it was trying to do if it dies before getting
> to main()? From what I could tell, you couldn't set a break point etc to diagnose the
> CRT initialization stuff. As far as that goes, what tools are there for dumping object or "a" files?
>
>
> Thanks.
>
>
>
>
> Mike Marchywka
> 586 Saint James Walk
> Marietta GA 30067-7165
> 404-788-1216 (C)<- leave message
> 989-348-4796 (P)<- emergency only
> marchywka@hotmail.com
> Note: If I am asking for free stuff, I normally use for hobby/non-profit
> information but may use in investment forums, public and private.
> Please indicate any concerns if applicable.
> Note: Hotmail is possibly blocking my mom's entire
> ISP - try me on marchywka@yahoo.com if no reply
> here. Thanks.
>
>
>> Date: Tue, 27 May 2008 00:54:37 -0700
>> From: brian@dessent.net
>> To: marchywka@hotmail.com
>> CC: cygwin@cygwin.com
>> Subject: Re: fate/resolution/location of things like "sys/sockio.h"
>>
>> Mike Marchywka wrote:
>>
>>> $ g++ nmapjunk.a libdnet-stripped/src/junkbin.a liblua/junkbin.a -Lnbase -lnbase -Lnsock/src -lnsock -Llibpcap -lpcap -liphlpapi -lws2_32 -lpcre -L. -lPacket
>>
>> I would not expect this to work in any case. Cygwin has no libpcap, so
>> you must be using the native windows winpcap, which is not a Cygwin
>> library (it's linked with MSVCRT.)
>>
>> Brian
>>
>> --
>> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
>> Problem reports: http://cygwin.com/problems.html
>> Documentation: http://cygwin.com/docs.html
>> FAQ: http://cygwin.com/faq/
>>
>
> _________________________________________________________________
> Make every e-mail and IM count. Join the i’m Initiative from Microsoft.
> http://im.live.com/Messenger/IM/Join/Default.aspx?source=EML_WL_ MakeCount
>
> --
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
> Problem reports: http://cygwin.com/problems.html
> Documentation: http://cygwin.com/docs.html
> FAQ: http://cygwin.com/faq/
>

_________________________________________________________________
Change the world with e-mail. Join the i’m Initiative from Microsoft.
http://im.live.com/Messenger/IM/Join/Default.aspx?source=EML_WL_ChangeWorld

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: fate/resolution/location of things like "sys/sockio.h"
  2008-05-27 13:57                           ` Mike Marchywka
@ 2008-05-27 14:05                             ` Brian Dessent
  2008-05-27 14:49                               ` Mike Marchywka
  2008-05-27 17:12                             ` Phil Betts
  1 sibling, 1 reply; 43+ messages in thread
From: Brian Dessent @ 2008-05-27 14:05 UTC (permalink / raw)
  To: Mike Marchywka; +Cc: cygwin

Mike Marchywka wrote:

> Also, FWIW, I took a sample program in wpdpack and compiled it WITH cygwin
> ( all the makefiles that came with the download did use -mno-cygwin )
> and it at least loaded ( it may function properly  but I haven't checked),

Yes, a trivial invocation of help output usually works.  But still the
problem remains that a library that was built against MSVCRT is not
supposed to be linked against code that was built against Cygwin -- they
are two very different runtimes.  For example, try running one of those
programs and then pressing ^C to stop it and I think you will find it
segfaults or malfunctions in some other random way.  Any behavior in
that situation that does work is by luck, is my point.

But I don't see why you're trying to build a Cygwin nmap anyway.  nmap
has a native win32 port so why not just build that using MinGW?

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* RE: fate/resolution/location of things like "sys/sockio.h"
  2008-05-27 14:05                             ` Brian Dessent
@ 2008-05-27 14:49                               ` Mike Marchywka
  0 siblings, 0 replies; 43+ messages in thread
From: Mike Marchywka @ 2008-05-27 14:49 UTC (permalink / raw)
  To: cygwin


> are two very different runtimes. For example, try running one of those
> programs and then pressing ^C to stop it and I think you will find it
> segfaults or malfunctions in some other random way. Any behavior in

I'd been skimming these topics, which was why I posted the glut program cygcheck as
it, and probably many programs, show msvcrt in cygcheck. I did just run the packet
capture program and hit refresh on my browser and got a bunch of nicely formated
hex data- I can't verify the data is right but any malfunction isn't due to stack corruption
or a gross build problem. It did even ctrl-C ok.

> But I don't see why you're trying to build a Cygwin nmap anyway. nmap
> has a native win32 port so why not just build that using MinGW?
>

I downloaded whatever they had and followed the instructions but that didn't work
right away. I've never used mingw and don't really see the point as I understand it is
limited and I've gotten used to cygwin. So, it seemed the easier thing to do was make everything
cygwin ( if it can be made to work). This was only supposed to be an example program as I wanted
to lift their ICMP code and write some LAN exploration utilities, their pre-built
binaries are fine for packet scans right now but it may be nice to modifiy a few things soon. 


Thanks.



Mike Marchywka
586 Saint James Walk
Marietta GA 30067-7165
404-788-1216 (C)<- leave message
989-348-4796 (P)<- emergency only
marchywka@hotmail.com
Note: If I am asking for free stuff, I normally use for hobby/non-profit
information but may use in investment forums, public and private.
Please indicate any concerns if applicable.
Note: Hotmail is possibly blocking my mom's entire
ISP - try  me on marchywka@yahoo.com if no reply
here. Thanks.


> Date: Tue, 27 May 2008 07:03:32 -0700
> From: brian@dessent.net
> To: marchywka@hotmail.com
> CC: cygwin@cygwin.com
> Subject: Re: fate/resolution/location of things like "sys/sockio.h"
>
> Mike Marchywka wrote:
>
>> Also, FWIW, I took a sample program in wpdpack and compiled it WITH cygwin
>> ( all the makefiles that came with the download did use -mno-cygwin )
>> and it at least loaded ( it may function properly but I haven't checked),
>
> Yes, a trivial invocation of help output usually works. But still the
> problem remains that a library that was built against MSVCRT is not
> supposed to be linked against code that was built against Cygwin -- they
> are two very different runtimes. For example, try running one of those
> programs and then pressing ^C to stop it and I think you will find it
> segfaults or malfunctions in some other random way. Any behavior in
> that situation that does work is by luck, is my point.
>
> But I don't see why you're trying to build a Cygwin nmap anyway. nmap
> has a native win32 port so why not just build that using MinGW?
>
> Brian
>
> --
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
> Problem reports: http://cygwin.com/problems.html
> Documentation: http://cygwin.com/docs.html
> FAQ: http://cygwin.com/faq/
>

_________________________________________________________________
E-mail for the greater good. Join the i’m Initiative from Microsoft.
http://im.live.com/Messenger/IM/Join/Default.aspx?source=EML_WL_ GreaterGood

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* RE: fate/resolution/location of things like "sys/sockio.h"
  2008-05-27 13:57                           ` Mike Marchywka
  2008-05-27 14:05                             ` Brian Dessent
@ 2008-05-27 17:12                             ` Phil Betts
  2008-05-27 17:20                               ` Mike Marchywka
  1 sibling, 1 reply; 43+ messages in thread
From: Phil Betts @ 2008-05-27 17:12 UTC (permalink / raw)
  To: cygwin

Mike Marchywka wrote on Tuesday, May 27, 2008 2:53 PM::

> $ cygcheck ./pktdump_ex.exe | sed -e 's/ /./g'
[snip]
> ..C:\WINNT\cygwin1.dll
       ^^^^^

This is asking for trouble.  Although it's probably nothing to do
with the current topic, chances are that it's out of date and likely 
to be the cause of all sorts of spurious errors.

The only cygwin1.dll on your system should be in /bin (aka /usr/bin)


Phil

-- 
One of the following statements is true:
This email has not been scanned by Ascribe PLC using Microsoft Antigen
for Exchange.
This email has been scanned by Ascribe PLC using Microsoft Antigen for Exchange.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* RE: fate/resolution/location of things like "sys/sockio.h"
  2008-05-27 17:12                             ` Phil Betts
@ 2008-05-27 17:20                               ` Mike Marchywka
  2008-05-28  2:15                                 ` Dave Korn
  0 siblings, 1 reply; 43+ messages in thread
From: Mike Marchywka @ 2008-05-27 17:20 UTC (permalink / raw)
  To: cygwin



>> ..C:\WINNT\cygwin1.dll
> ^^^^^
>
> This is asking for trouble. Although it's probably nothing to do


I didn't put it there, I thought that was normal as there are plenty of cyg* dll's there. 
At some point my install did get messed, which could be a part of the problem.
However, everything else appears to work and AFAIK the dll's are consistent.
Now that I think about it, I have had a problem with cdrw since a recent update
but that was a fairly overt problem and I thought that it was just built against an earlier cygwin1.dll
so it didn't seem like a mystery ( still runs from DOS window if the wrong cygwin1.dll hasn't been
previously loaded).

Of more interest is probably the relationship between cygwin and MSVCRT as 
things that mysteriously work sometimes may be worth examining. I guess they could
just avoid each other but it would be nice to know what the potential problems are.





Mike Marchywka
586 Saint James Walk
Marietta GA 30067-7165
404-788-1216 (C)<- leave message
989-348-4796 (P)<- emergency only
marchywka@hotmail.com
Note: If I am asking for free stuff, I normally use for hobby/non-profit
information but may use in investment forums, public and private.
Please indicate any concerns if applicable.
Note: Hotmail is possibly blocking my mom's entire
ISP - try  me on marchywka@yahoo.com if no reply
here. Thanks.


> Subject: RE: fate/resolution/location of things like "sys/sockio.h"
> Date: Tue, 27 May 2008 17:44:49 +0100
> From: Phil.Betts@ascribe.com
> To: cygwin@cygwin.com
>
> Mike Marchywka wrote on Tuesday, May 27, 2008 2:53 PM::
>
>> $ cygcheck ./pktdump_ex.exe | sed -e 's/ /./g'
> [snip]
>> ..C:\WINNT\cygwin1.dll
> ^^^^^
>
> This is asking for trouble. Although it's probably nothing to do
> with the current topic, chances are that it's out of date and likely
> to be the cause of all sorts of spurious errors.
>
> The only cygwin1.dll on your system should be in /bin (aka /usr/bin)
>
>
> Phil
>
> --
> One of the following statements is true:
> This email has not been scanned by Ascribe PLC using Microsoft Antigen
> for Exchange.
> This email has been scanned by Ascribe PLC using Microsoft Antigen for Exchange.
>
> --
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
> Problem reports: http://cygwin.com/problems.html
> Documentation: http://cygwin.com/docs.html
> FAQ: http://cygwin.com/faq/
>

_________________________________________________________________
Give to a good cause with every e-mail. Join the i’m Initiative from Microsoft.
http://im.live.com/Messenger/IM/Join/Default.aspx?souce=EML_WL_ GoodCause

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* RE: fate/resolution/location of things like "sys/sockio.h"
  2008-05-27 17:20                               ` Mike Marchywka
@ 2008-05-28  2:15                                 ` Dave Korn
  0 siblings, 0 replies; 43+ messages in thread
From: Dave Korn @ 2008-05-28  2:15 UTC (permalink / raw)
  To: cygwin

Mike Marchywka wrote on 27 May 2008 18:12:

>>> ..C:\WINNT\cygwin1.dll
>> ^^^^^
>> 
>> This is asking for trouble. Although it's probably nothing to do
> 
> 
> I didn't put it there, I thought that was normal as there are plenty of
> cyg* dll's there. 

  Well, it's "normal for a 3PP".  Which is abnormal by everyone else's
standards...


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* MS or cygwin dll debug tools/ was  "sys/sockio.h" etc.
  2008-05-27 13:20                         ` Mike Marchywka
  2008-05-27 13:57                           ` Mike Marchywka
@ 2008-05-28 15:00                           ` Mike Marchywka
  2008-05-28 15:36                             ` Greg Chicares
  2008-05-28 19:39                             ` Spiro Trikaliotis
  1 sibling, 2 replies; 43+ messages in thread
From: Mike Marchywka @ 2008-05-28 15:00 UTC (permalink / raw)
  To: cygwin


Regarding recent comments on dll problems and understanding cygwin1.dll versus msvcrt,
I was curious to know if anyone has used these ( free? ) MS tools or has comments on competing
products?

http://msdn.microsoft.com/en-us/library/cc267862.aspx
http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx

I thought I may be able to download a few pieces like some of the sysinternals products
but AFAIK you now need to download 17MB and hope the msi doesn't do anything 
funny. It may be worth it but if there is a better alternative I'd like to try that first.
Apparently gdb didn't let you do anything until getting to main() which is after the initial
process loads but some of the pages for the above tools suggest you can examine loading.

Also, fwiw, that glut program I cited earlier as an example of something that seems
to work but that invokes msvcrt and cygwin1, is available here,

http://www.spottext.com/marchywka/distroform.cfm?src=cygwindll

but I will warn you that there is nothing ready for distribution and the pages are a bit confusing. 
I collected a bunch of works-in-progress and started to make them available as part of
other work I was doing. I finally did determine that the streaming data viewer and
molecule viewer uses for the glut program were in fact useful to me and tried to
document some of the features but I'm not sure I will ever document or clean anything
up to the point of being coherent. The glut program does not always seem to start up reliably
on first invokation after a reboot and does have odd response to ctrl-C but otherwise seems
fine ( I assumed this was an issue with opengl,  not cygwin). 


Thanks.




> From: marchywka@hotmail.com
> To: cygwin@cygwin.com
> Subject: RE: fate/resolution/location of things like "sys/sockio.h"
> Date: Tue, 27 May 2008 07:03:55 -0400
>
>
>> Date: Tue, 27 May 2008 00:54:37 -0700
>> From: brian@dessent.net
>> Mike Marchywka wrote:
>>
>>> $ g++ nmapjunk.a libdnet-stripped/src/junkbin.a liblua/junkbin.a -Lnbase -lnbase -Lnsock/src -lnsock -Llibpcap -lpcap -liphlpapi -lws2_32 -lpcre -L. -lPacket
>>
>> I would not expect this to work in any case. Cygwin has no libpcap, so
>> you must be using the native windows winpcap, which is not a Cygwin
>> library (it's linked with MSVCRT.)
>>
>
> I have winpcap for an earlier install of ShowTraffic which runs fine. The nmap download
> comes with its own and getting everything consistent may be a problem but I can't
> come up with a diagnostic that confirms death during packet.dll load. I guess that is
> why I am more interested in diagnostic tools rather than expecting to find someone who
> knows offhand how to link my c++ version of nmap :)
>
> Is there some simple way to get gdb to tell you what it was trying to do if it dies before getting
> to main()? From what I could tell, you couldn't set a break point etc to diagnose the
> CRT initialization stuff. As far as that goes, what tools are there for dumping object or "a" files?
>
>
> Thanks.
>
>
>
>
> Mike Marchywka
> 586 Saint James Walk
> Marietta GA 30067-7165
> 404-788-1216 (C)<- leave message
> 989-348-4796 (P)<- emergency only
> marchywka@hotmail.com
> Note: If I am asking for free stuff, I normally use for hobby/non-profit
> information but may use in investment forums, public and private.
> Please indicate any concerns if applicable.
> Note: Hotmail is possibly blocking my mom's entire
> ISP - try me on marchywka@yahoo.com if no reply
> here. Thanks.
>
>
>> Date: Tue, 27 May 2008 00:54:37 -0700
>> From: brian@dessent.net
>> To: marchywka@hotmail.com
>> CC: cygwin@cygwin.com
>> Subject: Re: fate/resolution/location of things like "sys/sockio.h"
>>
>> Mike Marchywka wrote:
>>
>>> $ g++ nmapjunk.a libdnet-stripped/src/junkbin.a liblua/junkbin.a -Lnbase -lnbase -Lnsock/src -lnsock -Llibpcap -lpcap -liphlpapi -lws2_32 -lpcre -L. -lPacket
>>
>> I would not expect this to work in any case. Cygwin has no libpcap, so
>> you must be using the native windows winpcap, which is not a Cygwin
>> library (it's linked with MSVCRT.)
>>
>> Brian
>>
>> --
>> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
>> Problem reports: http://cygwin.com/problems.html
>> Documentation: http://cygwin.com/docs.html
>> FAQ: http://cygwin.com/faq/
>>
>
> _________________________________________________________________
> Make every e-mail and IM count. Join the i’m Initiative from Microsoft.
> http://im.live.com/Messenger/IM/Join/Default.aspx?source=EML_WL_ MakeCount
>
> --
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
> Problem reports: http://cygwin.com/problems.html
> Documentation: http://cygwin.com/docs.html
> FAQ: http://cygwin.com/faq/
>

_________________________________________________________________
Make every e-mail and IM count. Join the i’m Initiative from Microsoft.
http://im.live.com/Messenger/IM/Join/Default.aspx?source=EML_WL_ MakeCount

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: MS or cygwin dll debug tools/ was  "sys/sockio.h" etc.
  2008-05-28 15:00                           ` MS or cygwin dll debug tools/ was "sys/sockio.h" etc Mike Marchywka
@ 2008-05-28 15:36                             ` Greg Chicares
  2008-05-28 17:05                               ` Brian Dessent
  2008-05-28 19:39                             ` Spiro Trikaliotis
  1 sibling, 1 reply; 43+ messages in thread
From: Greg Chicares @ 2008-05-28 15:36 UTC (permalink / raw)
  To: cygwin

On 2008-05-28 14:15Z, Mike Marchywka wrote:
>
> I was curious to know if anyone has used these ( free? ) MS tools

Probably not free as in freedom; I haven't used them.

> Apparently gdb didn't let you do anything until getting to main() which is after the initial
> process loads but some of the pages for the above tools suggest you can examine loading.

Using cygwin's gdb on a MinGW app, I can set this breakpoint
  b '__mingw_CRTStartup'
on the function that invokes main(), and then examine variables
before main() is invoked. For a Cygwin app, I guess you'd break
on 'mainCRTStartup'. Does that breakpoint happen early enough to
meet your needs?

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: MS or cygwin dll debug tools/ was  "sys/sockio.h" etc.
  2008-05-28 15:36                             ` Greg Chicares
@ 2008-05-28 17:05                               ` Brian Dessent
  2008-05-28 19:48                                 ` Mike Marchywka
  0 siblings, 1 reply; 43+ messages in thread
From: Brian Dessent @ 2008-05-28 17:05 UTC (permalink / raw)
  To: Greg Chicares; +Cc: cygwin

Greg Chicares wrote:

> Using cygwin's gdb on a MinGW app, I can set this breakpoint
>   b '__mingw_CRTStartup'
> on the function that invokes main(), and then examine variables
> before main() is invoked. For a Cygwin app, I guess you'd break
> on 'mainCRTStartup'. Does that breakpoint happen early enough to
> meet your needs?

You can also do "info target" to display the entry point and then set a
breakpoint on it as e.g. "b *0x401000" if you want to start at the very
first instruction of the binary.  There is no such "can't debug before
main" restriction.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: MS or cygwin dll debug tools/ was  "sys/sockio.h" etc.
  2008-05-28 15:00                           ` MS or cygwin dll debug tools/ was "sys/sockio.h" etc Mike Marchywka
  2008-05-28 15:36                             ` Greg Chicares
@ 2008-05-28 19:39                             ` Spiro Trikaliotis
  1 sibling, 0 replies; 43+ messages in thread
From: Spiro Trikaliotis @ 2008-05-28 19:39 UTC (permalink / raw)
  To: cygwin

Hello,

* On Wed, May 28, 2008 at 10:15:05AM -0400 Mike Marchywka wrote:
> 
> Regarding recent comments on dll problems and understanding cygwin1.dll versus msvcrt,
> I was curious to know if anyone has used these ( free? ) MS tools or has comments on competing
> products?
> 
> http://msdn.microsoft.com/en-us/library/cc267862.aspx
> http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx

These a free in the sense that you do not have to pay to use them.
Additionally, you can get in contact with users and even some of the
developers on the Usenet (news:microsoft.public.windbg).

I use WinDBG rather frequently, and I like it very much. However, I must
tell you that I mainly use it for kernel-mode debugging. The Symbol
Server allows you to put the debugging symbols on a server. You can even
have a history of them; that is, for ever version of the executables you
give to customers (or to others), you put the symbols on the server.

If you get a crash dump afterwards from someone, WinDBG automatically
determines the right symbols. If you have also set up the source server,
it even gets the right sources out of your source control system. This
is very handy.

Note, however, that this mechanism relies on .PDB files for the
debugging information (I think the old-style .SYM work, also, but I have
not tested it). I never tried to use this with Cygwin or Mingw, however.

Regards,
Spiro.

-- 
Spiro R. Trikaliotis                              http://opencbm.sf.net/
http://www.trikaliotis.net/                     http://www.viceteam.org/

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* RE: MS or cygwin dll debug tools/ was  "sys/sockio.h" etc.
  2008-05-28 17:05                               ` Brian Dessent
@ 2008-05-28 19:48                                 ` Mike Marchywka
  2008-05-28 20:33                                   ` Brian Dessent
  0 siblings, 1 reply; 43+ messages in thread
From: Mike Marchywka @ 2008-05-28 19:48 UTC (permalink / raw)
  To: cygwin


> first instruction of the binary. There is no such "can't debug before
> main" restriction.
>

I think what bothered me is I just tried to step it to get minimum initial 
increment and that bombed- so I just assumed it wouldn't be early enough.
In any case, it looked like I needed to instrument the loading process, 

(gdb) info functions CRT
All functions matching regular expression "CRT":

Non-debugging symbols:
0x00401000  WinMainCRTStartup
0x00401000  mainCRTStartup
(gdb) info target
Symbols from "/cygdrive/e/new/temp/nmap/src3/nmap-4.62/a.exe".
Local exec file:
        `/cygdrive/e/new/temp/nmap/src3/nmap-4.62/a.exe', file type pei-i386.
        Entry point: 0x401000
        0x00401000 - 0x004e9608 is .text
        0x004ea000 - 0x004ebaa0 is .data
        0x004ec000 - 0x00509c24 is .rdata
        0x0050a000 - 0x00519b50 is .bss
        0x0051a000 - 0x0051bfa8 is .idata
(gdb) b *0x0401000
Breakpoint 1 at 0x401000
(gdb) run
Starting program: /cygdrive/e/new/temp/nmap/src3/nmap-4.62/a.exe

Program received signal SIGSEGV, Segmentation fault.

Program received signal SIGSEGV, Segmentation fault.

Program received signal SIGSEGV, Segmentation fault.

Program exited with code 0200.
You can't do that without a process to debug.
(gdb)

> Date: Wed, 28 May 2008 08:36:33 -0700
> From: brian@dessent.net
> To: gchicares@sbcglobal.net
> CC: cygwin@cygwin.com
> Subject: Re: MS or cygwin dll debug tools/ was "sys/sockio.h" etc.
>
> Greg Chicares wrote:
>
>> Using cygwin's gdb on a MinGW app, I can set this breakpoint
>> b '__mingw_CRTStartup'
>> on the function that invokes main(), and then examine variables
>> before main() is invoked. For a Cygwin app, I guess you'd break
>> on 'mainCRTStartup'. Does that breakpoint happen early enough to
>> meet your needs?
>
> You can also do "info target" to display the entry point and then set a
> breakpoint on it as e.g. "b *0x401000" if you want to start at the very
> first instruction of the binary. There is no such "can't debug before
> main" restriction.
>
> Brian
>
> --
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
> Problem reports: http://cygwin.com/problems.html
> Documentation: http://cygwin.com/docs.html
> FAQ: http://cygwin.com/faq/
>

_________________________________________________________________
Give to a good cause with every e-mail. Join the i’m Initiative from Microsoft.
http://im.live.com/Messenger/IM/Join/Default.aspx?souce=EML_WL_ GoodCause

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: MS or cygwin dll debug tools/ was  "sys/sockio.h" etc.
  2008-05-28 19:48                                 ` Mike Marchywka
@ 2008-05-28 20:33                                   ` Brian Dessent
  2008-05-28 20:49                                     ` Christopher Faylor
  2008-05-28 21:08                                     ` Mike Marchywka
  0 siblings, 2 replies; 43+ messages in thread
From: Brian Dessent @ 2008-05-28 20:33 UTC (permalink / raw)
  To: Mike Marchywka; +Cc: cygwin

Mike Marchywka wrote:

> (gdb) b *0x0401000
> Breakpoint 1 at 0x401000
> (gdb) run
> Starting program: /cygdrive/e/new/temp/nmap/src3/nmap-4.62/a.exe
> 
> Program received signal SIGSEGV, Segmentation fault.
> 
> Program received signal SIGSEGV, Segmentation fault.
> 
> Program received signal SIGSEGV, Segmentation fault.
> 
> Program exited with code 0200.
> You can't do that without a process to debug.
> (gdb)

The fact that it never actually begins execution therefore implies that
it encounters a fault by the OS loader during process initialization,
such as the "const data in .rdata needing relocation due to
auto-imports" situation.  I bet that if you invoke it via strace or from
a native command prompt (not bash) you will see a dialog box explaining
the fault since the "SetErrorMode (SEM_FAILCRITICALERRORS)" stuff won't
be active.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: MS or cygwin dll debug tools/ was  "sys/sockio.h" etc.
  2008-05-28 20:33                                   ` Brian Dessent
@ 2008-05-28 20:49                                     ` Christopher Faylor
  2008-05-28 21:00                                       ` Brian Dessent
  2008-05-28 21:08                                     ` Mike Marchywka
  1 sibling, 1 reply; 43+ messages in thread
From: Christopher Faylor @ 2008-05-28 20:49 UTC (permalink / raw)
  To: cygwin

On Wed, May 28, 2008 at 12:47:44PM -0700, Brian Dessent wrote:
>Mike Marchywka wrote:
>
>> (gdb) b *0x0401000
>> Breakpoint 1 at 0x401000
>> (gdb) run
>> Starting program: /cygdrive/e/new/temp/nmap/src3/nmap-4.62/a.exe
>> 
>> Program received signal SIGSEGV, Segmentation fault.
>> 
>> Program received signal SIGSEGV, Segmentation fault.
>> 
>> Program received signal SIGSEGV, Segmentation fault.
>> 
>> Program exited with code 0200.
>> You can't do that without a process to debug.
>> (gdb)
>
>The fact that it never actually begins execution therefore implies that
>it encounters a fault by the OS loader during process initialization,
>such as the "const data in .rdata needing relocation due to
>auto-imports" situation.  I bet that if you invoke it via strace or
>from a native command prompt (not bash) you will see a dialog box
>explaining the fault since the "SetErrorMode (SEM_FAILCRITICALERRORS)"
>stuff won't be active.

Aren't we still talking about using msvcrt and cygwin1 in the same
application where something like a SIGSEGV prior to initialization would
be the expected consequences of mixing the two dlls?

I'd think it likely that either msvcrt or cygwin1.dll to become confused
during dll initialization if one or the other was present.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: MS or cygwin dll debug tools/ was  "sys/sockio.h" etc.
  2008-05-28 20:49                                     ` Christopher Faylor
@ 2008-05-28 21:00                                       ` Brian Dessent
  0 siblings, 0 replies; 43+ messages in thread
From: Brian Dessent @ 2008-05-28 21:00 UTC (permalink / raw)
  To: cygwin

Christopher Faylor wrote:

> Aren't we still talking about using msvcrt and cygwin1 in the same
> application where something like a SIGSEGV prior to initialization would
> be the expected consequences of mixing the two dlls?

Right, that too I suppose.  You'd have to set breakpoints at the DllMain
of each of those.  Or use a startup-profiler like dependency walker.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* RE: MS or cygwin dll debug tools/ was  "sys/sockio.h" etc.
  2008-05-28 20:33                                   ` Brian Dessent
  2008-05-28 20:49                                     ` Christopher Faylor
@ 2008-05-28 21:08                                     ` Mike Marchywka
  2008-05-29  1:25                                       ` Brian Dessent
  1 sibling, 1 reply; 43+ messages in thread
From: Mike Marchywka @ 2008-05-28 21:08 UTC (permalink / raw)
  To: cygwin


> a native command prompt (not bash) you will see a dialog box explaining
> the fault since the "SetErrorMode (SEM_FAILCRITICALERRORS)" stuff won't
> be active.
>

I think I mentioned the windoze invokation before and got the definitive " The app failed to initialize ..."
meesage. I didn't know about strace, let me see if I can expand on this,

$ strace a.exe
--- Process 1380, exception C0000005 at 77F84E71
--- Process 1380, exception C0000005 at 77FAC57C




Mike Marchywka
586 Saint James Walk
Marietta GA 30067-7165
404-788-1216 (C)<- leave message
989-348-4796 (P)<- emergency only
marchywka@hotmail.com
Note: If I am asking for free stuff, I normally use for hobby/non-profit
information but may use in investment forums, public and private.
Please indicate any concerns if applicable.
Note: Hotmail is possibly blocking my mom's entire
ISP - try  me on marchywka@yahoo.com if no reply
here. Thanks.


> Date: Wed, 28 May 2008 12:47:44 -0700
> From: brian@dessent.net
> To: marchywka@hotmail.com
> CC: cygwin@cygwin.com
> Subject: Re: MS or cygwin dll debug tools/ was "sys/sockio.h" etc.
>
> Mike Marchywka wrote:
>
>> (gdb) b *0x0401000
>> Breakpoint 1 at 0x401000
>> (gdb) run
>> Starting program: /cygdrive/e/new/temp/nmap/src3/nmap-4.62/a.exe
>>
>> Program received signal SIGSEGV, Segmentation fault.
>>
>> Program received signal SIGSEGV, Segmentation fault.
>>
>> Program received signal SIGSEGV, Segmentation fault.
>>
>> Program exited with code 0200.
>> You can't do that without a process to debug.
>> (gdb)
>
> The fact that it never actually begins execution therefore implies that
> it encounters a fault by the OS loader during process initialization,
> such as the "const data in .rdata needing relocation due to
> auto-imports" situation. I bet that if you invoke it via strace or from
> a native command prompt (not bash) you will see a dialog box explaining
> the fault since the "SetErrorMode (SEM_FAILCRITICALERRORS)" stuff won't
> be active.
>
> Brian
>
> --
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
> Problem reports: http://cygwin.com/problems.html
> Documentation: http://cygwin.com/docs.html
> FAQ: http://cygwin.com/faq/
>

_________________________________________________________________
Keep your kids safer online with Windows Live Family Safety.
http://www.windowslive.com/family_safety/overview.html?ocid=TXT_TAGLM_WL_Refresh_family_safety_052008

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: MS or cygwin dll debug tools/ was  "sys/sockio.h" etc.
  2008-05-28 21:08                                     ` Mike Marchywka
@ 2008-05-29  1:25                                       ` Brian Dessent
  2008-05-30  1:49                                         ` Mike Marchywka
  0 siblings, 1 reply; 43+ messages in thread
From: Brian Dessent @ 2008-05-29  1:25 UTC (permalink / raw)
  To: Mike Marchywka; +Cc: cygwin

Mike Marchywka wrote:

> I think I mentioned the windoze invokation before and got the definitive " The app failed to initialize ..."
> meesage. I didn't know about strace, let me see if I can expand on this,

.rdata relocs it is then.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* RE: MS or cygwin dll debug tools/ was  "sys/sockio.h" etc.
  2008-05-29  1:25                                       ` Brian Dessent
@ 2008-05-30  1:49                                         ` Mike Marchywka
  2008-05-30 14:22                                           ` Brian Dessent
  0 siblings, 1 reply; 43+ messages in thread
From: Mike Marchywka @ 2008-05-30  1:49 UTC (permalink / raw)
  To: cygwin


> .rdata relocs it is then.

This is why I lurk as I now remember something about this and, sure, I can find it on google.
Of course, it would still be nice to have a fully instrumented load ( so where do I find the 
unreolcatable data?) .
I relinked with -strip and used dumpbin to find all the symbols in rdata but there are several hundred.
I thought I could grep the code for suspicious consts but no luck so far.
Isn't there some way to find the offending relocation attempt? What does strace know
about the stituation or does it just echo stuff from Windoze? 


Thanks.




Mike Marchywka
586 Saint James Walk
Marietta GA 30067-7165
404-788-1216 (C)<- leave message
989-348-4796 (P)<- emergency only
marchywka@hotmail.com
Note: If I am asking for free stuff, I normally use for hobby/non-profit
information but may use in investment forums, public and private.
Please indicate any concerns if applicable.
Note: Hotmail is possibly blocking my mom's entire
ISP - try  me on marchywka@yahoo.com if no reply
here. Thanks.


> Date: Wed, 28 May 2008 14:08:31 -0700
> From: brian@dessent.net
> To: marchywka@hotmail.com
> CC: cygwin@cygwin.com
> Subject: Re: MS or cygwin dll debug tools/ was "sys/sockio.h" etc.
>
> Mike Marchywka wrote:
>
>> I think I mentioned the windoze invokation before and got the definitive " The app failed to initialize ..."
>> meesage. I didn't know about strace, let me see if I can expand on this,
>
> .rdata relocs it is then.
>
> Brian

_________________________________________________________________
E-mail for the greater good. Join the i’m Initiative from Microsoft.
http://im.live.com/Messenger/IM/Join/Default.aspx?source=EML_WL_ GreaterGood

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: MS or cygwin dll debug tools/ was  "sys/sockio.h" etc.
  2008-05-30  1:49                                         ` Mike Marchywka
@ 2008-05-30 14:22                                           ` Brian Dessent
  0 siblings, 0 replies; 43+ messages in thread
From: Brian Dessent @ 2008-05-30 14:22 UTC (permalink / raw)
  To: Mike Marchywka; +Cc: cygwin

Mike Marchywka wrote:
> 
> > .rdata relocs it is then.
> 
> This is why I lurk as I now remember something about this and, sure, I can find it on google.
> Of course, it would still be nice to have a fully instrumented load ( so where do I find the
> unreolcatable data?) .
> I relinked with -strip and used dumpbin to find all the symbols in rdata but there are several hundred.
> I thought I could grep the code for suspicious consts but no luck so far.

The simplest method is just to tweak the linker script to make .rdata
writable (or rather, to map both .data and .rdata input segments into
the same .data output section.)

There is no method that I'm aware of to find the name of the offending
symbol.  Actually, that's not quite true, see
<http://cygwin.com/ml/cygwin-patches/2008-q1/msg00067.html>.  As I said
in that message though, those might just be coindicental and certainly
not guaranteed across OS versions or whatever.

> Isn't there some way to find the offending relocation attempt? What does strace know
> about the stituation or does it just echo stuff from Windoze?

strace under Cygwin is not like strace on other operating systems, it is
really just a glorified viewer for a bunch of debug_printf statements
that exist in the Cygwin code.  The error occurs before the process even
begins execution, during the period where NTLDR loads libraries into its
address space.  So, strace will be of no use.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

end of thread, other threads:[~2008-05-30 14:07 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-16 15:58 wstring support in GCC 4.1.2 in Cygwin 1.5.25-11 jadooo
2008-05-16 18:42 ` Yaakov (Cygwin Ports)
2008-05-17 12:00 ` jadooo
2008-05-19  4:47   ` Larry Hall (Cygwin)
2008-05-20 18:00     ` jadooo
2008-05-20 19:31       ` Greg Chicares
2008-05-21  2:02       ` Brian Dessent
2008-05-22 14:32         ` jadooo
2008-05-22 15:03           ` Larry Hall (Cygwin)
2008-05-22 15:15             ` fate/resolution/location of things like "sys/sockio.h" Mike Marchywka
2008-05-22 16:36               ` Dave Korn
2008-05-23  0:08                 ` Mike Marchywka
2008-05-23  0:10                   ` Christopher Faylor
2008-05-26 22:00                     ` Mike Marchywka
2008-05-27  9:12                       ` Brian Dessent
2008-05-27 13:20                         ` Mike Marchywka
2008-05-27 13:57                           ` Mike Marchywka
2008-05-27 14:05                             ` Brian Dessent
2008-05-27 14:49                               ` Mike Marchywka
2008-05-27 17:12                             ` Phil Betts
2008-05-27 17:20                               ` Mike Marchywka
2008-05-28  2:15                                 ` Dave Korn
2008-05-28 15:00                           ` MS or cygwin dll debug tools/ was "sys/sockio.h" etc Mike Marchywka
2008-05-28 15:36                             ` Greg Chicares
2008-05-28 17:05                               ` Brian Dessent
2008-05-28 19:48                                 ` Mike Marchywka
2008-05-28 20:33                                   ` Brian Dessent
2008-05-28 20:49                                     ` Christopher Faylor
2008-05-28 21:00                                       ` Brian Dessent
2008-05-28 21:08                                     ` Mike Marchywka
2008-05-29  1:25                                       ` Brian Dessent
2008-05-30  1:49                                         ` Mike Marchywka
2008-05-30 14:22                                           ` Brian Dessent
2008-05-28 19:39                             ` Spiro Trikaliotis
2008-05-22 19:14         ` wstring support in GCC 4.1.2 (OS independent) Linda Walsh
2008-05-23  9:24           ` Brian Dessent
2008-05-21 11:41 ` wstring support in GCC 4.1.2 in Cygwin 1.5.25-11 jadooo
2008-05-21 22:58   ` Longyu Mei
2008-05-22 10:27     ` jadooo
2008-05-22 21:48   ` Linda Walsh
2008-05-23  3:01     ` Eric Blake
2008-05-23 19:26       ` Linda Walsh
2008-05-23 20:30         ` Christopher Faylor

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