Need Program Compiled

Need Program Compiled

Post by Than Marten » Sun, 21 Apr 2002 05:46:22



I don't have a C compiler setup on my AIX 4.3.3 box, but I need a simple
program compiled.  I *really* don't want to setup the compiler just for this
one program, so I'm hoping that some gracious soul out there would compile

would greatly appreciate someones help.

Here is the source.  Thx-v-much.

Than Martens

P.S.  May god have mercy on your soul if you add a virus to the binary.

/***************************************************************************
****

* timechoice.c - Program to read from standard input with a timeout after *

* a specified number of seconds if nothing has been *

* entered. The input is then echoed to standard output. *

* *

* Usage: timechoice <seconds> *

* *

* Most common use is to call timechoice from a shell script in order to set
*

* the value of an environment variable. For example: *

* *

* #!/bin/sh *

* CHOICE=`timechoice 10 *

* *

* would read from standard input and place the result into CHOICE, or would
*

* exit after 10 seconds if nothing was entered. *

* *

****************************************************************************
*/

#include <stdio.h>

#include <stdlib.h>

#include <signal.h>

void timeout (void)

{

exit (2);

Quote:}

void main (argc, argv)

int argc;

char **argv;

{

char instring[255];

int timeoutval;

if (argc != 2) {

printf ("\nUsage: %s <seconds>\n\n", argv[0]);

exit (1);

Quote:}

if ((timeoutval = atoi (argv[1])) > 0) {

signal (SIGALRM, timeout);

alarm (timeoutval);

gets (instring);

puts (instring);

exit (0);

Quote:}

else exit (1);
Quote:}

 
 
 

1. can't compile c program... need help....

I just installed NETGEAR FA310TX ethernet card. I tried to install driver
for it. When I tried to compile tulip.c I had an error message:

    as: error in loading shared libraries
    libbfd - 2.9.1.0.4.so.0: cannot open shared object file: No such
    file or directory.

I'm very new to Linux. Can somebody help me with this problem. By the way, I
have Red Hat 5.1. Thank you very much.

2. problem of Disksuite run on E280R

3. Need advice to compile various programs under 2.x

4. irq timeout on bootup

5. I need to be able to compile java programs?

6. adduser problem

7. What packages do I need for compiling and simple C++ programming?

8. Compiling Drivers

9. HELP Needed in compiling a Fortran program

10. Compiling program that needs include/bsd

11. HELP Needed: Unable to compile a simple c program under Slackware 3.0,

12. compile C programs with UNIX system calls (= Unix Programs??)

13. CC compiled .so does not work with g++ compiled main program