Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MS-DOS compatibility #1324

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

MS-DOS compatibility #1324

wants to merge 2 commits into from

Conversation

jwt27
Copy link
Contributor

@jwt27 jwt27 commented Jul 1, 2023

This small patch will make asio compile for 32-bit DOS (djgpp), with the Watt32
socket library.

Some IPV6 option macros are missing, I don't know exactly how complete the
ipv6 implementation is. Defining those to 0 gets it to compile, but using them
will of course do nothing.

I tried some of the example programs. They compiled with no warnings, and seem
to run fine.

@jwt27
Copy link
Contributor Author

jwt27 commented Jul 3, 2023

I did discover a bug in libc that prevents ioctl() arguments from being
passed through to the socket library. So the workaround is to use
ioctlsocket(), but it takes a char*, so requires extra casts.

I sent in a patch to the mailing list. If that gets picked up soon then I
might drop the last commit, since it just adds extra clutter.

This also uncovered a bug/quirk in the way the socket library handles a
non-blocking connect(). Working on a PR for that now.

There is currently (2023-07-03) a bug in libc that prevents ioctl()
arguments from being passed to the socket library.  A workaround is to
use ioctlsocket() instead.
@jwt27
Copy link
Contributor Author

jwt27 commented Jul 6, 2023

Better solution: ioctlsocket() now takes a void* argument, so there's no need for extra casts (ref: gvanem/Watt-32#81).

The issue with non-blocking connect() also got fixed (ref: gvanem/Watt-32#80).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant