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

Support AIX operating system #351

Merged
merged 1 commit into from
Feb 24, 2023
Merged

Conversation

ecnelises
Copy link
Contributor

@ecnelises ecnelises commented Sep 21, 2022

No description provided.

@Thomasdezeeuw
Copy link
Collaborator

LGTM in principle, although I won't be able to officially support it. Two questions:

  • Can you resolve the merge conflicts?
  • Would it possible to create manual links for this by adding to man_links, see

    socket2/src/lib.rs

    Lines 120 to 166 in 4c43681

    macro_rules! man_links {
    // Links to all OSs.
    ($syscall: tt ( $section: tt ) ) => {
    concat!(
    man_links!(__ intro),
    man_links!(__ unix $syscall($section)),
    man_links!(__ windows $syscall($section)),
    )
    };
    // Links to Unix-like OSs.
    (unix: $syscall: tt ( $section: tt ) ) => {
    concat!(
    man_links!(__ intro),
    man_links!(__ unix $syscall($section)),
    )
    };
    // Links to Windows only.
    (windows: $syscall: tt ( $section: tt ) ) => {
    concat!(
    man_links!(__ intro),
    man_links!(__ windows $syscall($section)),
    )
    };
    // Internals.
    (__ intro) => {
    "\n\nAdditional documentation can be found in manual of the OS:\n\n"
    };
    // List for Unix-like OSs.
    (__ unix $syscall: tt ( $section: tt ) ) => {
    concat!(
    " * DragonFly BSD: <https://man.dragonflybsd.org/?command=", stringify!($syscall), "&section=", stringify!($section), ">\n",
    " * FreeBSD: <https://www.freebsd.org/cgi/man.cgi?query=", stringify!($syscall), "&sektion=", stringify!($section), ">\n",
    " * Linux: <https://man7.org/linux/man-pages/man", stringify!($section), "/", stringify!($syscall), ".", stringify!($section), ".html>\n",
    " * macOS: <https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/", stringify!($syscall), ".", stringify!($section), ".html> (archived, actually for iOS)\n",
    " * NetBSD: <https://man.netbsd.org/", stringify!($syscall), ".", stringify!($section), ">\n",
    " * OpenBSD: <https://man.openbsd.org/", stringify!($syscall), ".", stringify!($section), ">\n",
    " * iOS: <https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/", stringify!($syscall), ".", stringify!($section), ".html> (archived)\n",
    " * illumos: <https://illumos.org/man/3SOCKET/", stringify!($syscall), ">\n",
    )
    };
    // List for Window (so just Windows).
    (__ windows $syscall: tt ( $section: tt ) ) => {
    concat!(
    " * Windows: <https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-", stringify!($syscall), ">\n",
    )
    };
    }
    ?

@Thomasdezeeuw
Copy link
Collaborator

@ecnelises what is the status of this?

@ecnelises
Copy link
Contributor Author

Hi, the code part is ready. But AIX doesn't have a universal online man page url. For example, https://www.ibm.com/docs/en/aix/7.3?topic=f-fcntl-dup-dup2-subroutine or https://www.ibm.com/docs/en/aix/7.3?topic=i-iconv-subroutine

@ecnelises ecnelises marked this pull request as ready for review December 21, 2022 16:45
Copy link
Collaborator

@Thomasdezeeuw Thomasdezeeuw left a comment

Choose a reason for hiding this comment

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

LGTM. Three questions:

  • Can you rebase on master, we have added some code since this was originally written, so it might not build after a rebase.
  • Can you fix the rustfmt error.
  • Is their anything we can do for CI? Even a cargo check would be a good start.

@ecnelises
Copy link
Contributor Author

Thanks @Thomasdezeeuw

For cargo check, since powerpc64-ibm-aix is not fully available through rustup, it would fail. I will add it to cargo check matrix after it's available. :)

@Thomasdezeeuw
Copy link
Collaborator

Do you want to merge this now @ecnelises or do you want to wait until we have some CI support?

@ecnelises
Copy link
Contributor Author

Thanks, I'd like to merge it now.

@Thomasdezeeuw Thomasdezeeuw merged commit 2c4468f into rust-lang:master Feb 24, 2023
@Thomasdezeeuw
Copy link
Collaborator

Thanks @ecnelises

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.

None yet

2 participants