Add an experiment to verify the binding of epoll_create(2)

This commit is contained in:
R. Tyler Croy 2011-02-03 18:18:59 -08:00
parent 96417981f6
commit 9495536c63
3 changed files with 36 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1,23 @@
with Ada.Text_IO;
with Interfaces.C;
with Epoll;
use Ada.Text_IO;
use Interfaces;
procedure Epoll_Create is
Max_Size : C.int := 10;
begin
Put_Line (">> Start");
declare
use Interfaces.C;
RC : C.int := Epoll.Epoll_Create (Max_Size);
begin
Put_Line ("Epoll_Create returned: " & C.int'Image (RC));
if RC = -1 then
Put_Line (".. it appears that Epoll_Create encountered an error");
end if;
end;
end Epoll_Create;

View File

@ -0,0 +1,13 @@
project Epoll_Create is
for Source_Dirs use ("../../src", ".");
for Main use ("epoll_create.adb");
for Object_Dir use "build";
for Exec_Dir use ".";
package Compiler is
for Default_Switches("ada") use
("-O2", "-gnat05");
end Compiler;
end Epoll_Create;