Re: [Cegcc-devel] CeGCC 0.50 has been released

2007-06-20 Thread Carsten Sørensen
On 20/06/07, Danny Backx <[EMAIL PROTECTED]> wrote:
> Basically all you need to do is
> ftp upload.sf.net
> cd /incoming
> put your-file
> bye

OK!

I decided at the last minute to mimic your packages so cegcc and
mingw32ce both get their own package. Looks like you're stripping
executables so I did that as well in my build script, which instantly
halved the size of the packages.

I've uploaded four files in /incoming for OSX:

cegcc-0.50-i386.dmg
mingw32ce-0.50-i386.dmg
cegcc-0.50-powerpc.dmg
mingw32ce-0.50-powerpc.dmg

Hopefully you or Pedro will grab them before they go away.

Regards,
Carsten Sorensen

-
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


Re: [Cegcc-devel] CeGCC 0.50 has been released

2007-06-20 Thread Danny Backx
On Wed, 2007-06-20 at 12:42 +0200, Carsten Sørensen wrote:
> I decided at the last minute to mimic your packages so cegcc and
> mingw32ce both get their own package. Looks like you're stripping
> executables so I did that as well in my build script, which instantly
> halved the size of the packages.
> 
> I've uploaded four files in /incoming for OSX:
> 
> cegcc-0.50-i386.dmg
> mingw32ce-0.50-i386.dmg
> cegcc-0.50-powerpc.dmg
> mingw32ce-0.50-powerpc.dmg
> 
> Hopefully you or Pedro will grab them before they go away.

Yes, done.
Thanks.

I guess we should now edit the web site and docs, because we have one
more host platform than we used to have. How should I describe it ?

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


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


Re: [Cegcc-devel] CeGCC 0.50 has been released

2007-06-20 Thread Carsten Sørensen
On 20/06/07, Danny Backx <[EMAIL PROTECTED]> wrote:
> On Wed, 2007-06-20 at 12:42 +0200, Carsten Sørensen wrote:
> > I've uploaded four files in /incoming for OSX:
>
> I guess we should now edit the web site and docs, because we have one
> more host platform than we used to have. How should I describe it ?

Hmm I just realised I have to build it all over again... stupid
mistake, I usually build from SVN to my home dir, which is then
hardcoded into the gcc search paths :( Remove the files and I'll build
them again. Terribly sorry about that :(

As for description I'm not sure what you're looking for. Except for
gdb (which is not included) it's exactly the same as the linux and
cygwin builds.

Regards,
Carsten Sorensen
-
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


Re: [Cegcc-devel] CeGCC 0.50 has been released

2007-06-20 Thread Danny Backx
On Wed, 2007-06-20 at 19:29 +0200, Carsten Sørensen wrote:
> On 20/06/07, Danny Backx <[EMAIL PROTECTED]> wrote:
> > On Wed, 2007-06-20 at 12:42 +0200, Carsten Sørensen wrote:
> > > I've uploaded four files in /incoming for OSX:
> >
> > I guess we should now edit the web site and docs, because we have one
> > more host platform than we used to have. How should I describe it ?
> 
> Hmm I just realised I have to build it all over again... stupid
> mistake, I usually build from SVN to my home dir, which is then
> hardcoded into the gcc search paths :( Remove the files and I'll build
> them again. Terribly sorry about that :(

They're removed.

> As for description I'm not sure what you're looking for. Except for
> gdb (which is not included) it's exactly the same as the linux and
> cygwin builds.

It's just that I'm not familiar with OSX. You provided two types of
binaries (x86 and PowerPC). I guess I should probably change our texts
where they say e.g.

CeGCC is a cross-development environment for creating Windows CE
(Pocket PC) applications, from a Linux or a Cygwin host PC
to
CeGCC is a cross-development environment for creating Windows CE
(Pocket PC) applications, from a host PC. The host PC can run
one of three environments : Linux, Cygwin, or Apple's OS/X (on
x86 or PowerPC).

Or can the phrase be improved ?

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


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


Re: [Cegcc-devel] force stdio from newlib/cegcc.dll

2007-06-20 Thread Danny Backx
On Mon, 2007-06-18 at 22:41 -0600, Ximsce wrote:
> The exception handling doesn't seem to be working, I'm compiling from 
> subversion at the moment (takes 2 hours on my sadly out-dated computer). 
>   What version would you say is in the repository?

I just committed my cegcc exception handler. Let me know if it's useful,
whether it needs improvement, ..

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


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


Re: [Cegcc-devel] force stdio from newlib/cegcc.dll

2007-06-20 Thread Danny Backx
On Tue, 2007-06-19 at 19:52 -0600, Ximsce wrote:
> Pedro Alves wrote:
> > You didn't NULL terminate the argument list:
> > http://www.opengroup.org/onlinepubs/95399/functions/exec.html
> > 
> > "The argument argv is an array of character pointers to
> > null-terminated strings. The application shall ensure that the last
> > member of this array is a null pointer. These strings shall constitute
> > the argument list available to the new process image. The value in
> > argv[0] should point to a filename that is associated with the process
> > being started by one of the exec functions."

Even though the comments about the argv argument are accurate, this may
not be the right reference to quote from. 

I've been looking for reference material on MSDN. Here's one :
http://msdn2.microsoft.com/en-us/library/431x4c1w(VS.80).aspx

The reason I'm being picky on this is I suspect that behaviour for open
files may be different as well.

The MSDN doc states three things that catch my attention :
- deprecated API
- open files remain open but you must flush before exec
- translation mode of open files may change

But more importantly, I have my suspicions about your source. I think
the MSDN docs say that exec doesn't return (unless something went
wrong), but spawn can be used with a parameter to make it create a new
process.

See http://msdn2.microsoft.com/en-us/library/20y988d2(VS.80).aspx and
look into what _P_WAIT means. I suspect that you really want to replace
the execv call by a spawn call with this parameter.

I've tweaked your source a bit. You'll see an execv call, and a spawnv
call. Depending on which one you comment out, the application behaves
differently. Also note the fflush statement before execv or spawn.

With execv the original application is *replaced* by the second one, so
the END: text is never printed, the "Execution Complete" dialog is never
shown.

With spawnv, both do happen.

Danny

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

#define ERROR_LOG_FILE "/storage card/devel/log.txt"
#define	LAME_EXECUTABLE	"/storage card/devel/exec2.exe"

int encode()
{
	FILE	*logFile = fopen(ERROR_LOG_FILE, "a+");
	if (logFile == NULL) {
		MessageBoxW(0, L"Failed to open log.txt", L"Log File failure", 0);
		exit(1);
	}

	fprintf(logFile, "BEGIN: log file opened.\n");

	FILE *lame = fopen(LAME_EXECUTABLE, "r");
	if(lame == NULL) {
		fprintf(logFile, "Couldn't read %s\n", LAME_EXECUTABLE);
		exit(1);
	}
	fclose(lame);

	fprintf(logFile, "Successfully read lame executable.\n");

	char *args[3];
	args[0] = LAME_EXECUTABLE;
	args[1] = 0;

	fflush(logFile);
//	execv(LAME_EXECUTABLE, args);
	spawnv(_P_WAIT, LAME_EXECUTABLE, args);

	fprintf(logFile, "END: finished encoding all files.\n");
	fclose(logFile);

	MessageBoxW(0, L"Execution completed successfully.", L"Execution Complete", 0);

	return 0;
}


int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow)
{
	encode();

	return 0;
}
#include 
#include 
#include 

#define ERROR_LOG_FILE "/storage card/devel/log.txt"
#define	LAME_EXECUTABLE	"/storage card/devel/exec2.exe"

int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow)
{
	MessageBoxW(0, L"Yow", L"Baby baby", 0);

	return 0;
}



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


Re: [Cegcc-devel] CeGCC 0.50 has been released

2007-06-20 Thread Carsten Sørensen
On 20/06/07, Danny Backx <[EMAIL PROTECTED]> wrote:
> It's just that I'm not familiar with OSX. You provided two types of
> binaries (x86 and PowerPC). I guess I should probably change our texts
> where they say e.g.
>
> CeGCC is a cross-development environment for creating Windows CE
> (Pocket PC) applications, from a Linux or a Cygwin host PC
> to
> CeGCC is a cross-development environment for creating Windows CE
> (Pocket PC) applications, from a host PC. The host PC can run
> one of three environments : Linux, Cygwin, or Apple's OS/X (on
> x86 or PowerPC).
>
> Or can the phrase be improved ?

Ah. Yes, OS X runs on both PowerPC and x86 so that part's fine. The
operating system's correct name is "Mac OS X" (note spaces). I suppose
including "Apple" is optional, I suspect most of the target audience
would at least have heard of Mac OS X, in fact I don't think I've ever
seen anybody refer to it as Apple Mac OS X.

I've put up four new files with the same names as before. This time
tested using a fresh account :-/

Regards,
Carsten Sorensen

-
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


Re: [Cegcc-devel] force stdio from newlib/cegcc.dll

2007-06-20 Thread Danny Backx
On Wed, 2007-06-20 at 21:47 +0100, Pedro Alves wrote:
> Danny Backx wrote:
> > Even though the comments about the argv argument are accurate, this may
> > not be the right reference to quote from. 
> > 
> > I've been looking for reference material on MSDN. Here's one :
> > http://msdn2.microsoft.com/en-us/library/431x4c1w(VS.80).aspx
> > 
> 
> Look closer.  Those functions don't exist on
> coredll.dll.

I guess you're right.

I suspect I did identify the cause of the problems though. And the spawn
documentation on MSDN does predict what the modified example does. So
there's merit in looking there too.

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


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


Re: [Cegcc-devel] force stdio from newlib/cegcc.dll

2007-06-20 Thread Pedro Alves
Danny Backx wrote:
> On Tue, 2007-06-19 at 19:52 -0600, Ximsce wrote:
>> Pedro Alves wrote:
>>> You didn't NULL terminate the argument list:
>>> http://www.opengroup.org/onlinepubs/95399/functions/exec.html
>>>
>>> "The argument argv is an array of character pointers to
>>> null-terminated strings. The application shall ensure that the last
>>> member of this array is a null pointer. These strings shall constitute
>>> the argument list available to the new process image. The value in
>>> argv[0] should point to a filename that is associated with the process
>>> being started by one of the exec functions."
> 
> Even though the comments about the argv argument are accurate, this may
> not be the right reference to quote from. 
> 
> I've been looking for reference material on MSDN. Here's one :
> http://msdn2.microsoft.com/en-us/library/431x4c1w(VS.80).aspx
> 

Look closer.  Those functions don't exist on
coredll.dll.  You're looking at docs for the desktop versions
of Windows.  The OP posted code that is compilable with
cegcc, which uses newlib as CRT.  Opengroup is definitely a
better reference than MSDN, since MSFT is known to subvert standards
at will.  If we were talking about mingw32ce, then you would be
right, since in that case, we want to be as compatible as possible
with MSVC for WinCE/Devices, MinGW, MSVC for desktop, and only if there
aren't colisions, with what opengroup ratifies.

> With execv the original application is *replaced* by the second one, so
> the END: text is never printed, the "Execution Complete" dialog is never
> shown.
> 
> With spawnv, both do happen.
> 

Agreed.

(I'm sure there are a huge amount a bugs with our exec*/spawn*
implementations in newlib/libc/sys/wince, though.)

I suggest the OP to do a similar test in linux or cygwin first,
and only then try it on cegcc.

Cheers,
Pedro Alves


-
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


Re: [Cegcc-devel] CeGCC 0.50 has been released

2007-06-20 Thread Pedro Alves
Carsten Sørensen wrote:
> Danny Backx wrote:
>> It's just that I'm not familiar with OSX. You provided two types of
>> binaries (x86 and PowerPC). I guess I should probably change our texts
>> where they say e.g.
>>
>> CeGCC is a cross-development environment for creating Windows CE
>> (Pocket PC) applications, from a Linux or a Cygwin host PC
>> to
>> CeGCC is a cross-development environment for creating Windows CE
>> (Pocket PC) applications, from a host PC. The host PC can run
>> one of three environments : Linux, Cygwin, or Apple's OS/X (on
>> x86 or PowerPC).
>>
>> Or can the phrase be improved ?
> 

To me "can run", implies that it can't run on anything else.
What do you think of something along the lines of, :

CeGCC is a cross-development environment for creating Windows CE
(Pocket PC) applications.  We currently provide pre-built binaries
for x86 Linux, Cygwin and Mac OS X (x86 and PowerPC) hosts."


> Ah. Yes, OS X runs on both PowerPC and x86 so that part's fine. The
> operating system's correct name is "Mac OS X" (note spaces). I suppose
> including "Apple" is optional, I suspect most of the target audience
> would at least have heard of Mac OS X, in fact I don't think I've ever
> seen anybody refer to it as Apple Mac OS X.
> 
> I've put up four new files with the same names as before. This time
> tested using a fresh account :-/
> 

Many thanks.

Cheers,
Pedro Alves


-
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


Re: [Cegcc-devel] force stdio from newlib/cegcc.dll

2007-06-20 Thread Pedro Alves
Danny Backx wrote:
> On Wed, 2007-06-20 at 21:47 +0100, Pedro Alves wrote:
>> Danny Backx wrote:
>>> Even though the comments about the argv argument are accurate, this may
>>> not be the right reference to quote from. 
>>>
>>> I've been looking for reference material on MSDN. Here's one :
>>> http://msdn2.microsoft.com/en-us/library/431x4c1w(VS.80).aspx
>>>
>> Look closer.  Those functions don't exist on
>> coredll.dll.
> 
> I guess you're right.
> 
> I suspect I did identify the cause of the problems though. And the spawn
> documentation on MSDN does predict what the modified example does. So
> there's merit in looking there too.
> 

( Look closer (*), I agreed with you at the end of my previous reply. )

Sure, but if MSDN described spawn/exec the other way around, opengroup
would win.

For reference:

 From http://www.opengroup.org/onlinepubs/95399/functions/exec.html:

"The exec family of functions shall replace the current process image with a 
new 
process image. The new image shall be constructed from a regular, executable 
file called the new process image file. There shall be no return from a 
successful exec, because the calling process image is overlaid by the new 
process image."

And on spawn:
http://www.opengroup.org/onlinepubs/009695399/functions/posix_spawn.html

"The posix_spawn() and posix_spawnp() functions shall create a new process 
(child process) from the specified process image. The new process image shall 
be 
constructed from a regular executable file called the new process image file."

So to resume what Danny was saying, exec replaces, spawn doesn't.

Cheers,
Pedro Alves

(*) Just kidding. :)


-
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


Re: [Cegcc-devel] CeGCC 0.50 has been released

2007-06-20 Thread Carsten Sørensen
On 20/06/07, Pedro Alves <[EMAIL PROTECTED]> wrote:
> To me "can run", implies that it can't run on anything else.

I don't  agree, these are just the platforms which have been verified to work.

> What do you think of something along the lines of, :

However - your suggestion is much better. It's much more to the point,
not making any promises here.

> CeGCC is a cross-development environment for creating Windows CE
> (Pocket PC) applications.  We currently provide pre-built binaries
> for x86 Linux, Cygwin and Mac OS X (x86 and PowerPC) hosts."


Regards,
Carsten Sorensen

-
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


Re: [Cegcc-devel] force stdio from newlib/cegcc.dll

2007-06-20 Thread Ximsce
Pedro Alves wrote:
> So to resume what Danny was saying, exec replaces, spawn doesn't.

Yeah, I hadn't taken a close enough look at the exec documentation.  If 
you hadn't noticed,
it's been a while since I coded in C.  For the moment I've spliced my 
code into the lame
frontend directly, thus removing the need for exec or spawn, but I'll 
definitely take a
look at spawn for the next piece of the puzzle.

> Cheers,
> Pedro Alves

Much thanks,
Matt


-
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