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

Adapt code to string immutability #98

Closed
wants to merge 71 commits into from

Conversation

carlonluca
Copy link
Contributor

Compiling with recent versions of the ocaml compiler requires to respect the string immutability rule. This patch allows to build mldonkey without the unsafe strings switch, thus opening to new compiler versions and recent distros.

Respecting the string immutability rule required more byte/string conversions, which results in more copies. More refactoring is needed to prevent these copies.

This patch should close #46.

Ported updates from the upstream repo of the syslog module
up to revision becc8c4 version 2.0.2.
ygrek added a commit that referenced this pull request Jun 10, 2024
ygrek added a commit that referenced this pull request Jun 11, 2024
ygrek added a commit that referenced this pull request Jun 15, 2024
ygrek added a commit that referenced this pull request Jun 16, 2024
@ygrek
Copy link
Owner

ygrek commented Jun 16, 2024

I picked up some changes from this PR to safe-string branch.
Going to merge safe-string to master shortly and close this PR.
Would appreciate testing if I missed anything there.

builds for me with $ ./configure --enable-upnp-natpmp --enable-debug

Network modules:
 - eDonkey           enabled (eMule SUI enabled)
 - BitTorrent        enabled
 - FileTP (aka wget) enabled
 - Fasttrack         enabled
 - Gnutella                  disabled - unmaintained
 - Gnutella2                 disabled - unmaintained
 - Direct Connect    enabled
 - Open Napster              disabled - currently not usable
 - Soulseek                  disabled - currently not usable
 - OpenFT                    disabled - currently not usable

Core features:
 - zlib (required)   enabled
 - threads           enabled
 - bzip2             enabled
 - iconv             enabled
 - libmagic          enabled
 - upnp & natpmp     enabled
 - graphical stats           disabled

Compilers:
 - OCaml version     4.14.1 
 - gcc version       12
 - g++ version       12

Thanks a lot!

@ygrek ygrek mentioned this pull request Jun 16, 2024
@carlonluca carlonluca force-pushed the immutable-strings branch 5 times, most recently from 513eaa2 to cff78b0 Compare June 25, 2024 18:02
@ygrek
Copy link
Owner

ygrek commented Jul 8, 2024

#99 takes care of this, thanks for the push to get it done

@ygrek ygrek closed this Jul 8, 2024
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.

-unsafe-string usage
2 participants