tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Any interest in #pragma(lib) and CGI extensions?


From: Steven G. Messervey
Subject: Re: [Tinycc-devel] Any interest in #pragma(lib) and CGI extensions?
Date: Sat, 11 Apr 2015 11:40:54 -0400

>A preliminary patch for the -xc and -xa options is attached.

Fails. Output for a simple file (source included after output):
tcc -xc -run sgm/foo.cgi
-----------------------------8<-------------------------------------------------------
tcc: warning: file extension is C
sgm/foo.cgi:1: warning: We going to compile a C file

/usr/lib/i386-linux-gnu/libc.so:1: warning: We going to compile a C file

/usr/lib/i386-linux-gnu/libc.so:4: error: ',' expected (got "-")
/usr/lib/i386-linux-gnu/libc.a:1: warning: We going to compile a C file

/usr/lib/i386-linux-gnu/libc.a:1: error: declaration expected
/usr/local/lib/tcc/i386/libtcc1.a:1: warning: We going to compile a C file

/usr/local/lib/tcc/i386/libtcc1.a:1: error: declaration expected
---------------------------------------->8---------------------------------------------

Simple file (sgm/foo.cgi):
---------------------------------------->8-----------------------------------------------
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

int main(int argc, char **argv) {
  char *foo;
  foo = malloc(128);
  strcpy(foo,"Hello,CGI\n");
  printf(foo);
  free(foo);
  exit(0);
}
--------------------------------------8<----------------------------------------------------

Of course, if the extension is changed to '.c' it works as expected.

Thanks,
  Steven G.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]