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

New min size for SIZEOF_CURL_OFF_T breaks MS-DOS/DJGPP build #10905

Closed
SuperIlu opened this issue Apr 7, 2023 · 4 comments
Closed

New min size for SIZEOF_CURL_OFF_T breaks MS-DOS/DJGPP build #10905

SuperIlu opened this issue Apr 7, 2023 · 4 comments

Comments

@SuperIlu
Copy link

SuperIlu commented Apr 7, 2023

I did this

Try building curl with mbedTLS-2.28.3 and DJGPP yields the following error

In file included from base64.c:27:
curl_setup.h:445:2: error: #error "too small curl_off_t"
  445 | #error "too small curl_off_t"
      |  ^~~~~

Build is done using the following command line
make -C $(CURL)/lib -f Makefile.mk CFG=-zlib-mbedtls-watt TRIPLET=i586-pc-msdosdjgpp WATT_ROOT=$(WATT32)

I expected the following

Working build as with 7.87.0

curl/libcurl version

source release for 8.0.1

operating system

MS-DOS/DJGPP using i586-pc-msdosdjgpp-gcc (GCC) 12.2.0

cause of error

The change from #10597 is not compatible with the SIZEOF_CURL_OFF_T as defined in curl-8.0.1\lib\config-dos.h

Solution

The build works if I use #define SIZEOF_CURL_OFF_T 8 in curl-8.0.1\lib\config-dos.h. My TLS tests are still able to do HTTPS requests as with 7.87.0

@bagder
Copy link
Member

bagder commented Apr 7, 2023

Would you be able to provide a PR with the change that makes it work for you?

@SuperIlu
Copy link
Author

SuperIlu commented Apr 7, 2023

Sure, I'll try to get that done tomorrow...

@gvanem
Copy link
Contributor

gvanem commented Apr 8, 2023

The build works if I use #define SIZEOF_CURL_OFF_T 8 in curl-8.0.1\lib\config-dos.h

I also did that and libcurl compiled on DJGPP. But I've not tried it. I assume it wont be able to transfer anything
above > 2 GByte with this 32-bit off_t. But I see there is a typedef long long off64_t; in DJGPP which is AFAICS
effective for fseeko64() only.

@SuperIlu
Copy link
Author

SuperIlu commented Apr 8, 2023

Did some more tests yesterday with DOStodon and I noticed no problems.

@bagder bagder closed this as completed in 9261771 Apr 8, 2023
bch pushed a commit to bch/curl that referenced this issue Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants