On Sat, 2007-06-02 at 17:45 +0100, Pedro Alves wrote:
> And a serious question.  Am I right in saying that you use more of
> cegcc than mingw32ce?  I would like to know why - what feature from
> cegcc do you use the most, that doesn't exist in mingw32ce, because of
> its native aspect.

I'll answer this one now, the rest won't be for today.

Your impression is right, but this is mostly due to the fact that I am
porting an application that uses a bunch of UNIX functions that aren't
available in the mingw code. An example is strftime. My predecessor
wrote code like the snippet below. I've gotten things to work with
mingw32ce too now, but I have more confidence in cegcc with its newlib
than in code like the stuff below.

In case you want to look : the code is in the Xinvest CVS.
See http://xinvest.sunsite.dk .

        Danny

#if defined (NEED_STRPTIME)

/* Weird, FreeBSD (< 2.2?) and IRIX 5 don't have this, but do have
strftime. 
** This is a crippled implementation, only supporting the formats
** actually used in the rest of Xquote.  Note that the return _value_
** does not conform to the man page either.
*/
char *strptime(char* buf, char *fmt, struct tm *tm)
{
        char    *r, err_msg[128];

        if (strcmp(fmt, "%m/%d/%y") == 0) {
                sscanf(buf, "%d/%d/%d", &tm->tm_mon, &tm->tm_mday,
&tm->tm_year);
                r = buf + 8;
        } else if (strcmp(fmt, "%d/%m/%y") == 0) {
                sscanf(buf, "%d/%d/%d", &tm->tm_mday, &tm->tm_mon,
&tm->tm_year);
                r = buf + 8;
        } else if (strcmp(fmt, "%d/%m/%Y") == 0) {
                sscanf(buf, "%d/%d/%d", &tm->tm_mday, &tm->tm_mon,
&tm->tm_year);


-- 
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info

Attachment: signature.asc
Description: This is a digitally signed message part

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to