Skip to content

Conversation

@vszakats
Copy link
Member

@vszakats vszakats commented Oct 4, 2025

Both may apply to rare non-WinCE Windows builds too.

Regressions from 45438c8 #18823

Fixing ancient gcc error:
```
docs/examples/http2-upload.c:43:8: error: "_MSC_VER" is not defined
```
Ref: https://github.com/curl/curl/actions/runs/18238150607/job/51935502616
```
In file included from docs/examples/synctime.c:96:
include/curl/curl.h:141: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'curl_socket_t'
include/curl/curl.h:425: error: expected declaration specifiers or '...' before 'curl_socket_t'
include/curl/curl.h:435: error: field 'addr' has incomplete type
include/curl/curl.h:439: error: expected declaration specifiers or '...' before '*' token
cc1: warnings being treated as errors
include/curl/curl.h:441: error: type defaults to 'int' in declaration of 'curl_socket_t'
include/curl/curl.h:441: error: 'curl_socket_t' declared as function returning a function
include/curl/curl.h:441: error: function declaration isn't a prototype
In file included from include/curl/curl.h:3322,
                 from docs/examples/synctime.c:96:
include/curl/multi.h:115: error: field 'fd' declared as a function
include/curl/multi.h:159: error: expected declaration specifiers or '...' before 'fd_set'
include/curl/multi.h:160: error: expected declaration specifiers or '...' before 'fd_set'
include/curl/multi.h:161: error: expected declaration specifiers or '...' before 'fd_set'
In file included from include/curl/curl.h:3334,
                 from docs/examples/synctime.c:96:
include/curl/typecheck-gcc.h:773: error: 'Wcurl_opensocket_callback1' declared as function returning a function
include/curl/typecheck-gcc.h:775: error: 'Wcurl_opensocket_callback2' declared as function returning a function
include/curl/typecheck-gcc.h:777: error: 'Wcurl_opensocket_callback3' declared as function returning a function
include/curl/typecheck-gcc.h:779: error: 'Wcurl_opensocket_callback4' declared as function returning a function
docs/examples/synctime.c: In function 'SyncTime_CURL_Init':
docs/examples/synctime.c:197: error: expected specifier-qualifier-list before 'curl_opensocket_callback'
docs/examples/synctime.c:197: error: expected specifier-qualifier-list before 'curl_opensocket_callback'
docs/examples/synctime.c:197: error: expected expression before '||' token
docs/examples/synctime.c:197: error: expected statement before ')' token
docs/examples/synctime.c:197: error: expected statement before ')' token
docs/examples/synctime.c:200: error: expected specifier-qualifier-list before 'curl_opensocket_callback'
docs/examples/synctime.c:200: error: expected specifier-qualifier-list before 'curl_opensocket_callback'
docs/examples/synctime.c:200: error: expected expression before '||' token
docs/examples/synctime.c:200: error: expected statement before ')' token
docs/examples/synctime.c:200: error: expected statement before ')' token
docs/examples/synctime.c:202: error: expected specifier-qualifier-list before 'curl_opensocket_callback'
docs/examples/synctime.c:202: error: expected specifier-qualifier-list before 'curl_opensocket_callback'
docs/examples/synctime.c:202: error: expected expression before '||' token
docs/examples/synctime.c:202: error: expected statement before ')' token
docs/examples/synctime.c:202: error: expected statement before ')' token
docs/examples/synctime.c:203: error: expected specifier-qualifier-list before 'curl_opensocket_callback'
docs/examples/synctime.c:203: error: expected specifier-qualifier-list before 'curl_opensocket_callback'
docs/examples/synctime.c:203: error: expected expression before '||' token
docs/examples/synctime.c:203: error: expected statement before ')' token
docs/examples/synctime.c:203: error: expected statement before ')' token
docs/examples/synctime.c:204: error: expected specifier-qualifier-list before 'curl_opensocket_callback'
docs/examples/synctime.c:204: error: expected specifier-qualifier-list before 'curl_opensocket_callback'
docs/examples/synctime.c:204: error: expected expression before '||' token
docs/examples/synctime.c:204: error: expected statement before ')' token
docs/examples/synctime.c:204: error: expected statement before ')' token
docs/examples/synctime.c: In function 'SyncTime_CURL_Fetch':
docs/examples/synctime.c:215: error: expected specifier-qualifier-list before 'curl_opensocket_callback'
docs/examples/synctime.c:215: error: expected specifier-qualifier-list before 'curl_opensocket_callback'
docs/examples/synctime.c:215: error: expected expression before '||' token
docs/examples/synctime.c:215: error: expected statement before ')' token
docs/examples/synctime.c:215: error: expected statement before ')' token
docs/examples/synctime.c:218: error: expected specifier-qualifier-list before 'curl_opensocket_callback'
docs/examples/synctime.c:218: error: expected specifier-qualifier-list before 'curl_opensocket_callback'
docs/examples/synctime.c:218: error: expected expression before '||' token
docs/examples/synctime.c:218: error: expected statement before ')' token
docs/examples/synctime.c:218: error: expected statement before ')' token
docs/examples/synctime.c:221: error: expected specifier-qualifier-list before 'curl_opensocket_callback'
docs/examples/synctime.c:221: error: expected specifier-qualifier-list before 'curl_opensocket_callback'
docs/examples/synctime.c:221: error: expected expression before '||' token
docs/examples/synctime.c:221: error: expected statement before ')' token
docs/examples/synctime.c:221: error: expected statement before ')' token
```
Ref: https://github.com/curl/curl/actions/runs/18238383487/job/51936130514?pr=18039#step:12:124
@vszakats vszakats added build Windows Windows-specific labels Oct 4, 2025
@vszakats vszakats changed the title examples: fix two build issues for WinCE examples: fix two build issues surface with WinCE Oct 4, 2025
@vszakats vszakats changed the title examples: fix two build issues surface with WinCE examples: fix two build issues surfaced with WinCE Oct 4, 2025
@vszakats vszakats closed this in 4535532 Oct 4, 2025
@vszakats vszakats deleted the wincef branch October 4, 2025 09:37
vszakats added a commit to vszakats/curl that referenced this pull request Oct 10, 2025
- include `windows.h` after `winsock2.h` via `curl/curl.h`.
- avoid `errno` for WinCE.
- avoid `_vscprintf` for WinCE.

Ref: 4535532 curl#18843
Follow-up to 0780de2 curl#18668
Closes curl#19016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

1 participant