On Mon, 19 Feb 2007 12:09:10 +0100
"Carlos GP" <[EMAIL PROTECTED]> wrote:

> The following program works just fine under my regular Linux box.
> 
> #include <unistd.h>
> 
> int main()
> {
>  system("ls>kk");
>  return 0;
> }
> 
> ----
> I don't think so. It doesn't create me any "kk" archive...
> 
> I'll try again, but...
> 
> -- 
> Carlos GP


I "upgraded" the test to:
---
#include <stdio.h>
#include <stdlib.h>

int main()
{
  int error = system("ls>kk");
  if (error == 0){
    printf("Success\n");
  }
  else {
    printf("Failure: %d\n", error);
  }
  return 0;
}
---

and tried to compile it under scratchbox-apophis:

gcc -Wall -O0 -g -o test_armtel test.c

-Wall, told me that unistd.h didn't define "system", oddly the exe works just 
fine with unistd.h too...
I was too lazy to use -Wall last night. Just another example why all code 
should be compiled using Wall :)
As you can see the code has been compiled "gdb friendly" so you should be able 
to use the in gdb.

I have attached a small tar.gz archive containing the source and exe files for 
both i386 and arm.

The exe files work just fine in the scratchbox, and the arm exe also works on 
my n770
_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers

Reply via email to