Mercurial > archived > louis > epitech > zia-api
changeset 62:4d7e65058f93
Fix ssize_t on windows (close #7)
author | Louis Opter <opter_l@epitech.eu> |
---|---|
date | Tue, 30 Mar 2010 20:21:34 +0200 |
parents | 71782d1b8f92 |
children | 112b00938a3d |
files | CMakeScripts/FindStreamIt.cmake tests/INetworkHandler.cpp |
diffstat | 2 files changed, 64 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CMakeScripts/FindStreamIt.cmake Tue Mar 30 20:21:34 2010 +0200 @@ -0,0 +1,28 @@ +# If you use CMake as your build system you can use this script to set needed +# CMake variables. +# +# Howto: +# - Copy this file into a directory of your project; +# - Add this directory into your CMAKE_MODULE_PATH for example: +# "SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} <directory>)" +# - You can now use FIND_PACKAGE(StreamIt REQUIRED); +# +# If StreamIt cannot be found CMake will fail. Otherwise the following CMake +# variable is set: +# - STREAMIT_INCLUDE_DIR + +IF (STREAMIT_INCLUDE_DIR) + SET(STREAMIT_FIND_QUIETLY TRUE) +ENDIF (STREAMIT_INCLUDE_DIR) + +FIND_PATH(STREAMIT_INCLUDE_DIR + NAMES + IModule.hpp + PATHS + $ENV{STREAMIT_DIR} + PATH_SUFFIXES streamit + ) + +INCLUDE(FindPackageHandleStandardArgs) + +FIND_PACKAGE_HANDLE_STANDARD_ARGS(StreamIt DEFAULT_MSG STREAMIT_INCLUDE_DIR)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/INetworkHandler.cpp Tue Mar 30 20:21:34 2010 +0200 @@ -0,0 +1,36 @@ +#include <cstdlib> + +#include "handler/INetworkHandler.hpp" + +zia::api::network::IEndPoint* test_accept_func(zia::api::network::IEndPoint&) +{ + return (NULL); +} + +ssize_t test_read_func(zia::api::network::IEndPoint&, void*, size_t) +{ + return (0); +} + +ssize_t test_write_func(zia::api::network::IEndPoint&, const void*, size_t) +{ + return (0); +} + +int test_close_func(zia::api::network::IEndPoint&) +{ + return (0); +} + +int main(void) +{ + zia::api::handler::INetworkHandler::sPtrFunc hdlrs = + { + &test_accept_func, + &test_read_func, + &test_write_func, + &test_close_func + }; + + return (0); +}