comp.lang.ada
 help / color / mirror / Atom feed
* Who Maintains Win32Ada?
@ 2003-02-28 17:37 Frank J. Lhota
  2003-02-28 18:30 ` tmoran
  0 siblings, 1 reply; 2+ messages in thread
From: Frank J. Lhota @ 2003-02-28 17:37 UTC (permalink / raw)


I am using the Win32Ada packages for Win32 API services. This thin binding
is used by both the Gnat and ObjectAda compilers. I cannot help but notice
some errors in the Win32.Winsock package.

The FD_ZERO macro / Inline procedure, used to empty an fd_set object, is not
present in the specification. Curiously, there is an implementation of
FD_ZERO in the body of the Win32.Winsock package!

The Ada version of the "select" function (named c_select) is declared as
follows:

   function c_select
     (nfds : Win32.INT;
      readfds : access FD_SET;
      writefds : access FD_SET;
      exceptfds : access FD_SET;
      timeout : ac_TIMEVAL_t)
     return Win32.INT;                            --  winsock.h:741

Since the readfds, writefds, and exceptfds parameters are defined as
anonymous access types, you cannot use null as the actual parameter. This is
unfortunate, since null is frequently used as a convenient way to specify
that one of these sets is empty. It would be much better if the readfds,
writefds, and exceptfds parameters were declared as PFD_SET, a named access
type declared elsewhere in this package.

Moreover, Win32.Winsock is based on the <winsock.h> header, not the more
recent <winsock2.h> header with the new functionality introduced in Winsock
2.

Yes, I know that I can correct these errors by creating my own binding, or
bypass these problems with a thicker binding. Still, I would like to forward
these errors to whomever is maintaining Win32Ada so that other Ada
programmers will not have to struggle with this. Does anyone here know who I
should contact about Win32Ada?

Side Note: Ada interface issues aside, I really dislike the Winsock API. It
is not terribly POSIX compliant (even small bits of socket programming often
require modification to be valid Winsock code), and it also fails to
integrate with the rest of the Win32 API facilities. In this case, I know
who to complain to, but it is incredibly hard to get Mr. Gates attention.





^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Who Maintains Win32Ada?
  2003-02-28 17:37 Who Maintains Win32Ada? Frank J. Lhota
@ 2003-02-28 18:30 ` tmoran
  0 siblings, 0 replies; 2+ messages in thread
From: tmoran @ 2003-02-28 18:30 UTC (permalink / raw)


> integrate with the rest of the Win32 API facilities. In this case, I know
> who to complain to, but it is incredibly hard to get Mr. Gates attention.
The last time he answered the phone and answered my questions, he was
quite helpful.  MS's support has never been the same since they left
Albuquerque. ;)



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-02-28 18:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-28 17:37 Who Maintains Win32Ada? Frank J. Lhota
2003-02-28 18:30 ` tmoran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox