collect-aros: Remove dependency on elfedit
[AROS.git] / test / versionlib.c
blob092fd22f95cf9c226fcc2273c87fad4c254ae1ff
1 #include <dos/dos.h>
2 #include <aros/debug.h>
4 #include <proto/version.h>
5 #include <proto/exec.h>
7 #include <stdlib.h>
9 int main(int argc, char **argv)
11 LONG retval = RETURN_ERROR;
12 ULONG version = 0;
14 if (argc == 2)
16 version = atoi(argv[1]);
19 struct Library *VersionBase = OpenLibrary("version.library", version);
20 if (VersionBase)
22 if (VersionBase->lib_Version == 40)
24 retval = RETURN_OK;
26 else
28 bug("lib_Version != 40\n");
30 CloseLibrary(VersionBase);
32 else
34 bug("Can't open version.library v%u\n", version);
36 return retval;