#include <unistd.h>
#include <dlfcn.h>
#include <stdio.h>
Go to the source code of this file.
Typedefs | |
typedef int(*) | main_f (int argc, char *argv[]) |
Functions | |
int | main (int argc, char *argv[]) |
Definition in file cygload.c.
int main | ( | int | argc, | |
char * | argv[] | |||
) |
Definition at line 29 of file cygload.c.
00030 { 00031 main_f ast_main = NULL; 00032 void *handle = dlopen("asterisk.dll", 0); 00033 if (handle) 00034 ast_main = (main_f)dlsym(handle, "main"); 00035 if (ast_main) 00036 return ast_main(argc, argv); 00037 fprintf(stderr, "could not load Asterisk, %s\n", dlerror()); 00038 return 1; /* there was an error */ 00039 }