I'm rewriting C source to Ada and on some places there is conditional compilation for handling different platforms, such as windows vs posix, DEBUG, or architecture. For what I can tell neither Ada nor GPR has the notion of conditional compilation.
What's the Ada way of handling it?
Example:
/* Determine if a process is alive. */
#ifndef _WIN32
if (kill(pid, 0) && errno == ESRCH)
return 0; /* pid does not exist */
#else
HANDLE h;
if ((h = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, (DWORD)pid)) == 0)
return 0; /* pid does not exist */
CloseHandle(h);
#endif
return 1;