Skip to content

config-mac: define HAVE_SYS_IOCTL_H#10042

Closed
ryandesign wants to merge 1 commit intocurl:masterfrom
ryandesign:ryandesign-sys-filio.h
Closed

config-mac: define HAVE_SYS_IOCTL_H#10042
ryandesign wants to merge 1 commit intocurl:masterfrom
ryandesign:ryandesign-sys-filio.h

Conversation

@ryandesign
Copy link
Contributor

@ryandesign ryandesign commented Dec 6, 2022

Define HAVE_SYS_FILIO_H in config-mac.h and include <sys/filio.h> in nonblock.c when HAVE_SYS_FILIO_H is defined.

Define HAVE_SYS_IOCTL_H in config-mac.h. This is needed to compile nonblock.c on classic Mac OS with GUSI because nonblock.c uses FIONBIO which is defined in <sys/filio.h> which is included by <sys/ioctl.h>.

lib/config-mac.h Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Daft question since I don't know Mac OS other than as a user (a long time ago..). Is filio.h available on all versions of Mac OS on which it would be feasible to build libcurl? In other words, does it go further back than OS9?

Disclaimer: I'm mainly curious, I don't think it's a problem to define this if it doesn't

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Classic Mac OS does not have filio.h or other Unix headers. To build curl on classic Mac OS, the Grand Unified Socket Interface (GUSI) is required. It provides an early 2000s Unix-like socket and threads interface for classic Mac OS. It is compatible with System 7, Mac OS 8, and Mac OS 9.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha, thanks.

@ryandesign ryandesign marked this pull request as draft December 6, 2022 23:09
Define HAVE_SYS_IOCTL_H in config-mac.h. This is needed to compile
nonblock.c on classic Mac OS with GUSI because nonblock.c uses FIONBIO
which is defined in <sys/filio.h> which is included by <sys/ioctl.h>.
@ryandesign ryandesign force-pushed the ryandesign-sys-filio.h branch from 2353acf to 84cd2d7 Compare December 7, 2022 12:50
@ryandesign ryandesign changed the title Define HAVE_SYS_FILIO_H in config-mac.h; include <sys/filio.h> in nonblock.c config-mac: define HAVE_SYS_IOCTL_H Dec 7, 2022
@ryandesign ryandesign marked this pull request as ready for review December 7, 2022 12:51
@jay jay closed this in 33f1f4f Dec 7, 2022
@jay
Copy link
Member

jay commented Dec 7, 2022

Thanks

@ryandesign ryandesign deleted the ryandesign-sys-filio.h branch December 7, 2022 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants