Asterisk - The Open Source Telephony Project GIT-master-f36a736
Typedefs | Functions
cygload.c File Reference

Loader for Asterisk under Cygwin/windows. Open the dll, locate main, run. More...

#include <unistd.h>
#include <dlfcn.h>
#include <stdio.h>
Include dependency graph for cygload.c:

Go to the source code of this file.

Typedefs

typedef int(* main_f) (int argc, char *argv[])
 

Functions

int main (int argc, char *argv[])
 

Detailed Description

Loader for Asterisk under Cygwin/windows. Open the dll, locate main, run.

Definition in file cygload.c.

Typedef Documentation

◆ main_f

typedef int(* main_f) (int argc, char *argv[])

Definition at line 27 of file cygload.c.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 29 of file cygload.c.

30{
31 main_f ast_main = NULL;
32 void *handle = dlopen("asterisk.dll", 0);
33 if (handle)
34 ast_main = (main_f)dlsym(handle, "main");
35 if (ast_main)
36 return ast_main(argc, argv);
37 fprintf(stderr, "could not load Asterisk, %s\n", dlerror());
38 return 1; /* there was an error */
39}
int(* main_f)(int argc, char *argv[])
Definition: cygload.c:27
#define NULL
Definition: resample.c:96

References NULL.