I'm taking a look to the standard Ada POSIX binding, and the Florist implementation for GNAT. The aim is evaluating if a legacy application can be ported from its own use of pragma Import of the C POSIX functions to use the standard binding. The final objective is to be able to recompile the application in Solaris and Linux without source code changes. My doubt is about the several set of interfaces used in the UNIX tradition for Inter Process Communication features, like semaphores, message queues, etc. Florist is importing these C functions:
- Semaphores: sem_init sem_destroy sem_open sem_close sem_unlink sem_wait sem_trywait sem_post sem_getvalue
- Message queues: mq_close mq_getattr mq_notify mq_open mq_receive mq_send mq_setattr mq_unlink
While the application is importing these other sets: - Semaphores: semget semop semctl - Message queues: msgctl msgrcv msgsnd
Some sources defines the set used by the application as System V and not POSIX, while in others they are declared as standardized by IEEE Std 1003.1-2001, which apparently is POSIX.
My questions are:
- Are the "System V" sets really standardized by POSIX?
- If they are POSIX, why the standard Ada POSIX binding does not provide bindings to them? Are they "less POSIX" than the other interfaces?
- If I decide to port the application to Florist, what differences in behaviour should I take into account to prevent any regression? Would you recommend against it?