You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by "Lance Diduck (JIRA)" <ji...@apache.org> on 2005/09/14 04:20:54 UTC

[jira] Created: (STDCXX-23) [Cygwin] messages.cpp needs catopen, catgets etc

[Cygwin] messages.cpp needs catopen, catgets etc 
-------------------------------------------------

         Key: STDCXX-23
         URL: http://issues.apache.org/jira/browse/STDCXX-23
     Project: STDCXX
        Type: Bug
  Components: Build  
    Versions: 4.1.2    
 Environment: Cygwin
    Reporter: Lance Diduck
     Fix For: 4.1.3


>From http://mail-archives.apache.org/mod_mbox/incubator-stdcxx-dev/200509.mbox/%3c200509111213.j8BCDGMG006690@ms-smtp-03.rdc-nyc.rr.com%3e:

-------- Original Message --------
Subject: Cygwin build
Date: Sun, 11 Sep 2005 08:13:38 -0400
From: Lance Diduck <la...@nyc.rr.com>
Reply-To: stdcxx-dev@incubator.apache.org
To: <st...@incubator.apache.org>

Notes on  Cygwin build __CYGWIN__ using gcc 3.4.4 BUILDTYPE=11s default modes 

1. <unistd.h> defines _SC_PAGESIZE and not _SC_PAGE_SIZE,  I put a define in
memattr.cpp to get to compile, but I'm sure that's probably not the best place
[...]

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (STDCXX-23) [Cygwin] messages.cpp needs catopen, catgets etc

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-23?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Sebor updated STDCXX-23:
-------------------------------

    Priority: Trivial  (was: Major)

Lowered priority since the issue can be trivially dealt with simply by installing libcatgets which is now available for Cygwin (and comes with it, it just may not be selected as a default library in the installation gui).

> [Cygwin] messages.cpp needs catopen, catgets etc
> ------------------------------------------------
>
>                 Key: STDCXX-23
>                 URL: https://issues.apache.org/jira/browse/STDCXX-23
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: 22. Localization
>    Affects Versions: 4.1.2
>         Environment: Cygwin
>            Reporter: Lance Diduck
>            Priority: Trivial
>             Fix For: 4.2
>
>
> http://sources.redhat.com/ml/cygwin/2004-04/msg00679.html shows that libc does not have catopen, catgets, etc. Library compiles but does not link. 
> A recent thread (Jun 2005) discusses adding "libcatgets" http://blog.gmane.org/gmane.os.cygwin.applications/month=20050601 
> There are at least these approaches:
> 1. Implement the missing stuff ourselves
> 2. Implement messages.cpp in terms of the underlying Windows messaging subsystem (i.e. FormatMessage, etc)
> 3. Require libcatgets , change build 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (STDCXX-23) [Cygwin] messages.cpp needs catopen, catgets etc

Posted by "Lance Diduck (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/STDCXX-23?page=comments#action_12330397 ] 

Lance Diduck commented on STDCXX-23:
------------------------------------

notes:: 
Found that Mac OS X has the identical problem -- since catopen etc is not a Standard C lib function, the issue is more that we rely on catopen et al. See http://developer.apple.com/technotes/tn2002/tn2071.html 
The problem with relying on the Windows subsystem is that the windows stuff needs a system call to kernel32.dll, which required kernel32.lib see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/resources/introductiontoresources/resourcereference/resourcefunctions/loadresource.asp 
Mingw may already support the windwos call . But if Cygwin has the same hole as Mac OS X, then implementing our own "compatibility layer" may be the best way.
But note, that if we use the native platfrom method , which would liely be the most reliable, then we should also use the native resource compilers.

> [Cygwin] messages.cpp needs catopen, catgets etc
> ------------------------------------------------
>
>          Key: STDCXX-23
>          URL: http://issues.apache.org/jira/browse/STDCXX-23
>      Project: STDCXX
>         Type: Bug
>   Components: 22. Localization
>     Versions: 4.1.2
>  Environment: Cygwin
>     Reporter: Lance Diduck
>      Fix For: 4.1.3

>
> http://sources.redhat.com/ml/cygwin/2004-04/msg00679.html shows that libc does not have catopen, catgets, etc. Library compiles but does not link. 
> A recent thread (Jun 2005) discusses adding "libcatgets" http://blog.gmane.org/gmane.os.cygwin.applications/month=20050601 
> There are at least these approaches:
> 1. Implement the missing stuff ourselves
> 2. Implement messages.cpp in terms of the underlying Windows messaging subsystem (i.e. FormatMessage, etc)
> 3. Require libcatgets , change build 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (STDCXX-23) [Cygwin] messages.cpp needs catopen, catgets etc

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-23?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Sebor updated STDCXX-23:
-------------------------------

    Affects Version/s: 4.1.3
                       4.1.4
        Fix Version/s:     (was: 4.2)
                       4.2.1

Added 4.1.3 and 4.1.4 to the list of affected versions and deferred for 4.2.1.

> [Cygwin] messages.cpp needs catopen, catgets etc
> ------------------------------------------------
>
>                 Key: STDCXX-23
>                 URL: https://issues.apache.org/jira/browse/STDCXX-23
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: 22. Localization
>    Affects Versions: 4.1.2, 4.1.3, 4.1.4
>         Environment: Cygwin
>            Reporter: Lance Diduck
>            Priority: Trivial
>             Fix For: 4.2.1
>
>
> http://sources.redhat.com/ml/cygwin/2004-04/msg00679.html shows that libc does not have catopen, catgets, etc. Library compiles but does not link. 
> A recent thread (Jun 2005) discusses adding "libcatgets" http://blog.gmane.org/gmane.os.cygwin.applications/month=20050601 
> There are at least these approaches:
> 1. Implement the missing stuff ourselves
> 2. Implement messages.cpp in terms of the underlying Windows messaging subsystem (i.e. FormatMessage, etc)
> 3. Require libcatgets , change build 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (STDCXX-23) [Cygwin] messages.cpp needs catopen, catgets etc

Posted by "Lance Diduck (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/STDCXX-23?page=comments#action_12330439 ] 

Lance Diduck commented on STDCXX-23:
------------------------------------

notes:
cygwin prefers gettext to catopen et al. This seems to be the story for Mac, and Sun as well. See http://developer.apple.com/documentation/DeveloperTools/gcc-3.3/libstdc++/22_locale/messages.html , http://www.gnu.org/software/libc/manual/html_node/Message-catalogs-with-gettext.html#Message-catalogs-with-gettext , http://www.gnu.org/software/libc/manual/html_node/The-Uniforum-approach.html#The-Uniforum-approach 

The answer is likely rather to use gettext utilites, rather than trying to come up with our own portable catalog subsystem.  It seems easy to make rwstdmessages in the PO format, but I'm unclear where the lookup of the resutling messages are, and how to do the lookup and formatting. gettext also has the same semantics as LoadString from Windows. Indeed, Dinkumware does not seem support message catalogs at all on Windows.

Another thing to watch is Unicode CLDR http://www.unicode.org/cldr/ It looks like they may address this issue as well.

> [Cygwin] messages.cpp needs catopen, catgets etc
> ------------------------------------------------
>
>          Key: STDCXX-23
>          URL: http://issues.apache.org/jira/browse/STDCXX-23
>      Project: STDCXX
>         Type: Bug
>   Components: 22. Localization
>     Versions: 4.1.2
>  Environment: Cygwin
>     Reporter: Lance Diduck
>      Fix For: 4.1.3

>
> http://sources.redhat.com/ml/cygwin/2004-04/msg00679.html shows that libc does not have catopen, catgets, etc. Library compiles but does not link. 
> A recent thread (Jun 2005) discusses adding "libcatgets" http://blog.gmane.org/gmane.os.cygwin.applications/month=20050601 
> There are at least these approaches:
> 1. Implement the missing stuff ourselves
> 2. Implement messages.cpp in terms of the underlying Windows messaging subsystem (i.e. FormatMessage, etc)
> 3. Require libcatgets , change build 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (STDCXX-23) [Cygwin] messages.cpp needs catopen, catgets etc

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/STDCXX-23?page=comments#action_12329314 ] 

Martin Sebor commented on STDCXX-23:
------------------------------------

At the very least, we need to avoid using the functions if they are not defined on Cygwin so that the library links. This should be done the same way all other libc functions are configured. I.e., there ought to be a pair of config macros: _RWSTD_NO_CATOPEN and _RWSTD_NO_CATOPEN_IN_LIBC, the former corresponding to a declaration of the function in <nl_types.h> and the latter that corresponds to the definition in libc (or libcatgets). The tricky part will be handling the declaration-with-no-definition type of a configuration result. We currently assume that a declaration implies a definition (see etc/config/src/libc_decl.sh).

A robust solution should probably involve letting users decide whether to use catopen and catgets (assuming it's installed) or the Windows native messaging facility. I would probably choose catopen as the default (if it's installed) and let users #define a config macro to use the Windows stuff instead.

> [Cygwin] messages.cpp needs catopen, catgets etc
> ------------------------------------------------
>
>          Key: STDCXX-23
>          URL: http://issues.apache.org/jira/browse/STDCXX-23
>      Project: STDCXX
>         Type: Bug
>   Components: 22. Localization
>     Versions: 4.1.2
>  Environment: Cygwin
>     Reporter: Lance Diduck
>      Fix For: 4.1.3

>
> http://sources.redhat.com/ml/cygwin/2004-04/msg00679.html shows that libc does not have catopen, catgets, etc. Library compiles but does not link. 
> A recent thread (Jun 2005) discusses adding "libcatgets" http://blog.gmane.org/gmane.os.cygwin.applications/month=20050601 
> There are at least these approaches:
> 1. Implement the missing stuff ourselves
> 2. Implement messages.cpp in terms of the underlying Windows messaging subsystem (i.e. FormatMessage, etc)
> 3. Require libcatgets , change build 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (STDCXX-23) [Cygwin] messages.cpp needs catopen, catgets etc

Posted by "Lance Diduck (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/STDCXX-23?page=all ]

Lance Diduck updated STDCXX-23:
-------------------------------

      Component: 22. Localization
                     (was: Build)
    Description: 
http://sources.redhat.com/ml/cygwin/2004-04/msg00679.html shows that libc does not have catopen, catgets, etc. Library compiles but does not link. 
A recent thread (Jun 2005) discusses adding "libcatgets" http://blog.gmane.org/gmane.os.cygwin.applications/month=20050601 
There are at least these approaches:
1. Implement the missing stuff ourselves
2. Implement messages.cpp in terms of the underlying Windows messaging subsystem (i.e. FormatMessage, etc)
3. Require libcatgets , change build 




  was:
>From http://mail-archives.apache.org/mod_mbox/incubator-stdcxx-dev/200509.mbox/%3c200509111213.j8BCDGMG006690@ms-smtp-03.rdc-nyc.rr.com%3e:

-------- Original Message --------
Subject: Cygwin build
Date: Sun, 11 Sep 2005 08:13:38 -0400
From: Lance Diduck <la...@nyc.rr.com>
Reply-To: stdcxx-dev@incubator.apache.org
To: <st...@incubator.apache.org>

Notes on  Cygwin build __CYGWIN__ using gcc 3.4.4 BUILDTYPE=11s default modes 

1. <unistd.h> defines _SC_PAGESIZE and not _SC_PAGE_SIZE,  I put a define in
memattr.cpp to get to compile, but I'm sure that's probably not the best place
[...]


> [Cygwin] messages.cpp needs catopen, catgets etc
> ------------------------------------------------
>
>          Key: STDCXX-23
>          URL: http://issues.apache.org/jira/browse/STDCXX-23
>      Project: STDCXX
>         Type: Bug
>   Components: 22. Localization
>     Versions: 4.1.2
>  Environment: Cygwin
>     Reporter: Lance Diduck
>      Fix For: 4.1.3

>
> http://sources.redhat.com/ml/cygwin/2004-04/msg00679.html shows that libc does not have catopen, catgets, etc. Library compiles but does not link. 
> A recent thread (Jun 2005) discusses adding "libcatgets" http://blog.gmane.org/gmane.os.cygwin.applications/month=20050601 
> There are at least these approaches:
> 1. Implement the missing stuff ourselves
> 2. Implement messages.cpp in terms of the underlying Windows messaging subsystem (i.e. FormatMessage, etc)
> 3. Require libcatgets , change build 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (STDCXX-23) [Cygwin] messages.cpp needs catopen, catgets etc

Posted by "Lance Diduck (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/STDCXX-23?page=comments#action_12330687 ] 

Lance Diduck commented on STDCXX-23:
------------------------------------

another solution may be to use windres 
myapp.res : myapp.rc resource.h
	windres $< -O coff -o $@


This works::

/cygdrive/c/stdcxx/src$ windres -i rwstderr.rc -o rwstderr.res -I ../include

After I come back from vaaction I'll look to see if gettext works with this. 

> [Cygwin] messages.cpp needs catopen, catgets etc
> ------------------------------------------------
>
>          Key: STDCXX-23
>          URL: http://issues.apache.org/jira/browse/STDCXX-23
>      Project: STDCXX
>         Type: Bug
>   Components: 22. Localization
>     Versions: 4.1.2
>  Environment: Cygwin
>     Reporter: Lance Diduck
>      Fix For: 4.1.3

>
> http://sources.redhat.com/ml/cygwin/2004-04/msg00679.html shows that libc does not have catopen, catgets, etc. Library compiles but does not link. 
> A recent thread (Jun 2005) discusses adding "libcatgets" http://blog.gmane.org/gmane.os.cygwin.applications/month=20050601 
> There are at least these approaches:
> 1. Implement the missing stuff ourselves
> 2. Implement messages.cpp in terms of the underlying Windows messaging subsystem (i.e. FormatMessage, etc)
> 3. Require libcatgets , change build 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (STDCXX-23) [Cygwin] messages.cpp needs catopen, catgets etc

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/STDCXX-23?page=all ]

Martin Sebor updated STDCXX-23:
-------------------------------

    Fix Version: 4.2
                     (was: 4.1.4)

> [Cygwin] messages.cpp needs catopen, catgets etc
> ------------------------------------------------
>
>          Key: STDCXX-23
>          URL: http://issues.apache.org/jira/browse/STDCXX-23
>      Project: C++ Standard Library
>         Type: Bug

>   Components: 22. Localization
>     Versions: 4.1.2
>  Environment: Cygwin
>     Reporter: Lance Diduck
>      Fix For: 4.2

>
> http://sources.redhat.com/ml/cygwin/2004-04/msg00679.html shows that libc does not have catopen, catgets, etc. Library compiles but does not link. 
> A recent thread (Jun 2005) discusses adding "libcatgets" http://blog.gmane.org/gmane.os.cygwin.applications/month=20050601 
> There are at least these approaches:
> 1. Implement the missing stuff ourselves
> 2. Implement messages.cpp in terms of the underlying Windows messaging subsystem (i.e. FormatMessage, etc)
> 3. Require libcatgets , change build 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (STDCXX-23) [Cygwin] messages.cpp needs catopen, catgets etc

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/STDCXX-23?page=all ]

Martin Sebor updated STDCXX-23:
-------------------------------

    Fix Version: 4.1.4
                     (was: 4.1.3)

> [Cygwin] messages.cpp needs catopen, catgets etc
> ------------------------------------------------
>
>          Key: STDCXX-23
>          URL: http://issues.apache.org/jira/browse/STDCXX-23
>      Project: STDCXX
>         Type: Bug
>   Components: 22. Localization
>     Versions: 4.1.2
>  Environment: Cygwin
>     Reporter: Lance Diduck
>      Fix For: 4.1.4

>
> http://sources.redhat.com/ml/cygwin/2004-04/msg00679.html shows that libc does not have catopen, catgets, etc. Library compiles but does not link. 
> A recent thread (Jun 2005) discusses adding "libcatgets" http://blog.gmane.org/gmane.os.cygwin.applications/month=20050601 
> There are at least these approaches:
> 1. Implement the missing stuff ourselves
> 2. Implement messages.cpp in terms of the underlying Windows messaging subsystem (i.e. FormatMessage, etc)
> 3. Require libcatgets , change build 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira