Skip to content

wrapped32: enable 65 missing libresolv entries#3603

Open
gigachadmma69 wants to merge 1 commit intoptitSeb:mainfrom
gigachadmma69:fix/wrapped32-libresolv
Open

wrapped32: enable 65 missing libresolv entries#3603
gigachadmma69 wants to merge 1 commit intoptitSeb:mainfrom
gigachadmma69:fix/wrapped32-libresolv

Conversation

@gigachadmma69
Copy link
Contributor

@gigachadmma69 gigachadmma69 commented Mar 1, 2026

Summary

Enable 65 DNS resolver functions for 32-bit emulation that were commented out despite having working 64-bit equivalents.

Details

All entries are simple GO/GOW passthroughs with signatures matching the 64-bit wrapper. No struct conversion is needed since resolver functions work with byte buffers and scalar types.

Enabled function groups:

Group Functions Count
Base64 __b64_ntop, __b64_pton 2
Domain name __dn_comp, __dn_count_labels, __dn_skipname 3
Name service ns_get16/32, ns_put16/32, ns_name_*, ns_makecanon, ns_parse_ttl, ns_format_ttl, ns_samedomain, ns_samename, ns_subdomain, ns_skiprr, ns_sprintrr* 28
Resolver __res_close, __res_send, __res_dnok, __res_hnok, __res_hostalias, __res_isourserver, __res_mailok, __res_nameinquery, __res_ownok, __res_queriesmatch 10
Print/debug __p_class, __p_type, __p_query, __p_rcode, __p_option, __p_time, __p_cdname, __p_cdnname, __p_fqname, __p_fqnname, __fp_nquery, __fp_query, __fp_resstat 13
Misc __hostalias, inet_net_*, __loc_*, __putlong, __putshort, __sym_*, ns_datetosecs 9

Intentionally skipped:

  • dn_expand, res_mkquery, res_querydomain — use GOM in 64-bit (need custom wrappers)
  • Entries with incomplete signatures (_getht*, _getlong, __res_context_*, etc.)
  • DATA entries (__p_class_syms, __p_type_syms, _res_opcodes)

@ptitSeb
Copy link
Owner

ptitSeb commented Mar 1, 2026

Seriously, put the generated files in your PR!!!!

@ptitSeb
Copy link
Owner

ptitSeb commented Mar 2, 2026

Removing the functions instead of adding the missing files is not an acceptable fix (and just prove you don't build box64 with box32). I will not merge the PR in it's current form.

Enable DNS resolver functions for 32-bit emulation that were previously
commented out due to missing converter types in wrapper32.c/wrapper32.h.

Add 13 new converter types to the Box32 generated wrapper files:
- vFpS, vFpiS: void(ptr, [int,] FILE*)
- vFLp: void(ulong, ptr)
- iFpLpL, iFLpL, iFippL, iFppLpp, iFpppppL: int with ulong args
- iFpLpuuLpLpppL: int(ptr, ulong, ptr, uint, uint, ulong, ptr, ulong, ptr, ptr, ptr, ulong)
- pFupL, pFipipL: ptr with int/uint + ulong args
- pFppS, pFppiS: ptr(ptr, ptr, [int,] FILE*)

Enabled function groups:
| Group       | Functions                                          | Count |
|-------------|----------------------------------------------------|-------|
| Base64      | __b64_ntop, __b64_pton                             | 2     |
| Domain name | __dn_comp, __dn_count_labels, __dn_skipname        | 3     |
| Name svc    | ns_get16/32, ns_put16/32, ns_name_*, ns_parse*,    | 28    |
|             | ns_makecanon, ns_format_ttl, ns_samedomain, etc.   |       |
| Resolver    | __res_close, __res_send, __res_dnok, __res_hnok,   | 10    |
|             | __res_hostalias, __res_mailok, etc.                |       |
| Print/debug | __p_class, __p_type, __p_query, __fp_nquery, etc.  | 13    |
| Misc        | __hostalias, inet_net_*, __loc_*, __sym_*,         | 11    |
|             | ns_datetosecs, inet_neta                           |       |
| Special     | __dn_expand (GO2), ns_initparse/parserr (GOM)      | 3     |
| Already on  | __res_query, res_query, res_search, __res_search,  |  3    |
| main        | __res_nquery, __res_nsearch                        |       |

Skipped (use GOM in 64-bit, need custom wrappers):
- dn_expand, res_mkquery, res_querydomain

Skipped (incomplete signatures or DATA entries):
- _getht*, _getlong, _getshort, __p_class_syms, __p_type_syms, _res_opcodes

Built and verified with box32 enabled.
@gigachadmma69 gigachadmma69 force-pushed the fix/wrapped32-libresolv branch from d907783 to d600c3a Compare March 4, 2026 19:43
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.

2 participants