@@ -84,6 +84,44 @@ const std::vector<std::string> internal_pinvoke_names = {
84
84
};
85
85
86
86
const std::vector<std::string> dotnet_pinvoke_names = {
87
+ // libSystem.Globalization.Native.so
88
+ " GlobalizationNative_ChangeCase" ,
89
+ " GlobalizationNative_ChangeCaseInvariant" ,
90
+ " GlobalizationNative_ChangeCaseTurkish" ,
91
+ " GlobalizationNative_CloseSortHandle" ,
92
+ " GlobalizationNative_CompareString" ,
93
+ " GlobalizationNative_EndsWith" ,
94
+ " GlobalizationNative_EnumCalendarInfo" ,
95
+ " GlobalizationNative_GetCalendarInfo" ,
96
+ " GlobalizationNative_GetCalendars" ,
97
+ " GlobalizationNative_GetDefaultLocaleName" ,
98
+ " GlobalizationNative_GetICUVersion" ,
99
+ " GlobalizationNative_GetJapaneseEraStartDate" ,
100
+ " GlobalizationNative_GetLatestJapaneseEra" ,
101
+ " GlobalizationNative_GetLocaleInfoGroupingSizes" ,
102
+ " GlobalizationNative_GetLocaleInfoInt" ,
103
+ " GlobalizationNative_GetLocaleInfoString" ,
104
+ " GlobalizationNative_GetLocaleName" ,
105
+ " GlobalizationNative_GetLocales" ,
106
+ " GlobalizationNative_GetLocaleTimeFormat" ,
107
+ " GlobalizationNative_GetSortHandle" ,
108
+ " GlobalizationNative_GetSortKey" ,
109
+ " GlobalizationNative_GetSortVersion" ,
110
+ " GlobalizationNative_GetTimeZoneDisplayName" ,
111
+ " GlobalizationNative_IanaIdToWindowsId" ,
112
+ " GlobalizationNative_IndexOf" ,
113
+ " GlobalizationNative_InitICUFunctions" ,
114
+ " GlobalizationNative_InitOrdinalCasingPage" ,
115
+ " GlobalizationNative_IsNormalized" ,
116
+ " GlobalizationNative_IsPredefinedLocale" ,
117
+ " GlobalizationNative_LastIndexOf" ,
118
+ " GlobalizationNative_LoadICU" ,
119
+ " GlobalizationNative_NormalizeString" ,
120
+ " GlobalizationNative_StartsWith" ,
121
+ " GlobalizationNative_ToAscii" ,
122
+ " GlobalizationNative_ToUnicode" ,
123
+ " GlobalizationNative_WindowsIdToIanaId" ,
124
+
87
125
// libSystem.IO.Compression.Native.so
88
126
" BrotliDecoderCreateInstance" ,
89
127
" BrotliDecoderDecompress" ,
@@ -117,11 +155,9 @@ const std::vector<std::string> dotnet_pinvoke_names = {
117
155
" CompressionNative_Deflate" ,
118
156
" CompressionNative_DeflateEnd" ,
119
157
" CompressionNative_DeflateInit2_" ,
120
- " CompressionNative_DeflateReset" ,
121
158
" CompressionNative_Inflate" ,
122
159
" CompressionNative_InflateEnd" ,
123
160
" CompressionNative_InflateInit2_" ,
124
- " CompressionNative_InflateReset" ,
125
161
126
162
// libSystem.Native.so
127
163
" SystemNative_Abort" ,
@@ -140,6 +176,7 @@ const std::vector<std::string> dotnet_pinvoke_names = {
140
176
" SystemNative_CloseSocketEventPort" ,
141
177
" SystemNative_ConfigureTerminalForChildProcess" ,
142
178
" SystemNative_Connect" ,
179
+ " SystemNative_Connectx" ,
143
180
" SystemNative_ConvertErrorPalToPlatform" ,
144
181
" SystemNative_ConvertErrorPlatformToPal" ,
145
182
" SystemNative_CopyFile" ,
@@ -210,7 +247,6 @@ const std::vector<std::string> dotnet_pinvoke_names = {
210
247
" SystemNative_GetHostName" ,
211
248
" SystemNative_GetIcmpv4GlobalStatistics" ,
212
249
" SystemNative_GetIcmpv6GlobalStatistics" ,
213
- " SystemNative_GetIPSocketAddressSizes" ,
214
250
" SystemNative_GetIPv4Address" ,
215
251
" SystemNative_GetIPv4GlobalStatistics" ,
216
252
" SystemNative_GetIPv4MulticastOption" ,
@@ -227,7 +263,6 @@ const std::vector<std::string> dotnet_pinvoke_names = {
227
263
" SystemNative_GetOSArchitecture" ,
228
264
" SystemNative_GetPeerID" ,
229
265
" SystemNative_GetPeerName" ,
230
- " SystemNative_GetPeerUserName" ,
231
266
" SystemNative_GetPid" ,
232
267
" SystemNative_GetPlatformSignalNumber" ,
233
268
" SystemNative_GetPort" ,
@@ -241,6 +276,7 @@ const std::vector<std::string> dotnet_pinvoke_names = {
241
276
" SystemNative_GetRLimit" ,
242
277
" SystemNative_GetSid" ,
243
278
" SystemNative_GetSignalForBreak" ,
279
+ " SystemNative_GetSocketAddressSizes" ,
244
280
" SystemNative_GetSocketErrorOption" ,
245
281
" SystemNative_GetSocketType" ,
246
282
" SystemNative_GetSockName" ,
@@ -249,7 +285,9 @@ const std::vector<std::string> dotnet_pinvoke_names = {
249
285
" SystemNative_GetSystemTimeAsTicks" ,
250
286
" SystemNative_GetTcpGlobalStatistics" ,
251
287
" SystemNative_GetTimestamp" ,
288
+ " SystemNative_GetTimeZoneData" ,
252
289
" SystemNative_GetUdpGlobalStatistics" ,
290
+ " SystemNative_GetUInt64OSThreadId" ,
253
291
" SystemNative_GetUnixRelease" ,
254
292
" SystemNative_GetUnixVersion" ,
255
293
" SystemNative_GetWindowSize" ,
@@ -289,6 +327,7 @@ const std::vector<std::string> dotnet_pinvoke_names = {
289
327
" SystemNative_MkNod" ,
290
328
" SystemNative_MksTemps" ,
291
329
" SystemNative_MMap" ,
330
+ " SystemNative_MProtect" ,
292
331
" SystemNative_MSync" ,
293
332
" SystemNative_MUnmap" ,
294
333
" SystemNative_Open" ,
@@ -312,6 +351,7 @@ const std::vector<std::string> dotnet_pinvoke_names = {
312
351
" SystemNative_RealPath" ,
313
352
" SystemNative_Receive" ,
314
353
" SystemNative_ReceiveMessage" ,
354
+ " SystemNative_ReceiveSocketError" ,
315
355
" SystemNative_RegisterForSigChld" ,
316
356
" SystemNative_Rename" ,
317
357
" SystemNative_RmDir" ,
@@ -348,6 +388,8 @@ const std::vector<std::string> dotnet_pinvoke_names = {
348
388
" SystemNative_ShmUnlink" ,
349
389
" SystemNative_Shutdown" ,
350
390
" SystemNative_SNPrintF" ,
391
+ " SystemNative_SNPrintF_1I" ,
392
+ " SystemNative_SNPrintF_1S" ,
351
393
" SystemNative_Socket" ,
352
394
" SystemNative_Stat" ,
353
395
" SystemNative_StdinReady" ,
@@ -359,6 +401,7 @@ const std::vector<std::string> dotnet_pinvoke_names = {
359
401
" SystemNative_SysLog" ,
360
402
" SystemNative_TryChangeSocketEventRegistration" ,
361
403
" SystemNative_TryGetIPPacketInformation" ,
404
+ " SystemNative_TryGetUInt32OSThreadId" ,
362
405
" SystemNative_UninitializeConsoleAfterRead" ,
363
406
" SystemNative_Unlink" ,
364
407
" SystemNative_UTimensat" ,
@@ -434,6 +477,7 @@ const std::vector<std::string> dotnet_pinvoke_names = {
434
477
" AndroidCryptoNative_GetECKeyParameters" ,
435
478
" AndroidCryptoNative_GetRsaParameters" ,
436
479
" AndroidCryptoNative_NewGlobalReference" ,
480
+ " AndroidCryptoNative_Pbkdf2" ,
437
481
" AndroidCryptoNative_RegisterRemoteCertificateValidationCallback" ,
438
482
" AndroidCryptoNative_RsaCreate" ,
439
483
" AndroidCryptoNative_RsaDestroy" ,
@@ -448,6 +492,7 @@ const std::vector<std::string> dotnet_pinvoke_names = {
448
492
" AndroidCryptoNative_SSLGetSupportedProtocols" ,
449
493
" AndroidCryptoNative_SSLStreamCreate" ,
450
494
" AndroidCryptoNative_SSLStreamCreateWithCertificates" ,
495
+ " AndroidCryptoNative_SSLStreamCreateWithKeyStorePrivateKeyEntry" ,
451
496
" AndroidCryptoNative_SSLStreamGetApplicationProtocol" ,
452
497
" AndroidCryptoNative_SSLStreamGetCipherSuite" ,
453
498
" AndroidCryptoNative_SSLStreamGetPeerCertificate" ,
@@ -479,13 +524,17 @@ const std::vector<std::string> dotnet_pinvoke_names = {
479
524
" AndroidCryptoNative_X509DecodeCollection" ,
480
525
" AndroidCryptoNative_X509Encode" ,
481
526
" AndroidCryptoNative_X509ExportPkcs7" ,
527
+ " AndroidCryptoNative_X509GetCertificateForPrivateKeyEntry" ,
482
528
" AndroidCryptoNative_X509GetContentType" ,
529
+ " AndroidCryptoNative_X509IsKeyStorePrivateKeyEntry" ,
483
530
" AndroidCryptoNative_X509PublicKey" ,
484
531
" AndroidCryptoNative_X509StoreAddCertificate" ,
485
532
" AndroidCryptoNative_X509StoreAddCertificateWithPrivateKey" ,
486
533
" AndroidCryptoNative_X509StoreContainsCertificate" ,
534
+ " AndroidCryptoNative_X509StoreDeleteEntry" ,
487
535
" AndroidCryptoNative_X509StoreEnumerateCertificates" ,
488
536
" AndroidCryptoNative_X509StoreEnumerateTrustedCertificates" ,
537
+ " AndroidCryptoNative_X509StoreGetPrivateKeyEntry" ,
489
538
" AndroidCryptoNative_X509StoreOpenDefault" ,
490
539
" AndroidCryptoNative_X509StoreRemoveCertificate" ,
491
540
" CryptoNative_EnsureOpenSslInitialized" ,
@@ -501,6 +550,7 @@ const std::vector<std::string> dotnet_pinvoke_names = {
501
550
" CryptoNative_EvpDigestReset" ,
502
551
" CryptoNative_EvpDigestUpdate" ,
503
552
" CryptoNative_EvpMd5" ,
553
+ " CryptoNative_EvpMdCtxCopyEx" ,
504
554
" CryptoNative_EvpMdCtxCreate" ,
505
555
" CryptoNative_EvpMdCtxDestroy" ,
506
556
" CryptoNative_EvpMdSize" ,
@@ -517,6 +567,7 @@ const std::vector<std::string> dotnet_pinvoke_names = {
517
567
" CryptoNative_HmacOneShot" ,
518
568
" CryptoNative_HmacReset" ,
519
569
" CryptoNative_HmacUpdate" ,
570
+ " Java_net_dot_android_crypto_DotnetProxyTrustManager_verifyRemoteCertificate" ,
520
571
};
521
572
522
573
template <typename Hash>
@@ -541,14 +592,14 @@ struct PinvokeEntry
541
592
542
593
void print (std::ostream& os, std::string comment, std::string variable_name, auto const & seq)
543
594
{
544
- os << " //" << comment << ' \n ' ;
545
- os << " static PinvokeEntry " << variable_name << " [] = {" << std::endl;
595
+ os << " \t //" << comment << ' \n ' ;
596
+ os << " \t std::array< PinvokeEntry, " << std::dec << seq. size () << " > " << variable_name << " { {" << std::endl;
546
597
547
598
for (auto const & elem : seq) {
548
- os << " \t {" << elem << " }," << std::endl;
599
+ os << " \t\t {" << elem << " }," << std::endl;
549
600
}
550
601
551
- os << " }; " << std::endl;
602
+ os << " \t }}; " << std::endl << std::endl;
552
603
}
553
604
554
605
template <typename Hash>
@@ -601,6 +652,7 @@ void write_library_name_hashes (Hash (*hasher)(const char*, size_t), std::ostrea
601
652
write_library_name_hash (hasher, output, " libSystem.Native" , " system_native" );
602
653
write_library_name_hash (hasher, output, " libSystem.IO.Compression.Native" , " system_io_compression_native" );
603
654
write_library_name_hash (hasher, output, " libSystem.Security.Cryptography.Native.Android" , " system_security_cryptography_native_android" );
655
+ write_library_name_hash (hasher, output, " libSystem.Globalization.Native" , " system_globalization_native" );
604
656
}
605
657
606
658
int main (int argc, char **argv)
@@ -655,8 +707,10 @@ int main (int argc, char **argv)
655
707
output << " // A compiler with support for C++20 ranges is required" << std::endl;
656
708
output << " //" << std::endl << std::endl;
657
709
710
+ output << " #include <array>" << std::endl;
658
711
output << " #include <cstdint>" << std::endl << std::endl;
659
712
713
+ output << " namespace {" << std::endl;
660
714
output << " #if INTPTR_MAX == INT64_MAX" << std::endl;
661
715
print (output, " 64-bit internal p/invoke table" , " internal_pinvokes" , internal_pinvokes64);
662
716
print (output, " 64-bit DotNet p/invoke table" , " dotnet_pinvokes" , dotnet_pinvokes64);
@@ -674,6 +728,7 @@ int main (int argc, char **argv)
674
728
675
729
output << " constexpr size_t internal_pinvokes_count = " << std::dec << std::noshowbase << internal_pinvoke_names.size () << " ;" << std::endl;
676
730
output << " constexpr size_t dotnet_pinvokes_count = " << std::dec << std::noshowbase << dotnet_pinvoke_names.size () << " ;" << std::endl;
731
+ output << " } // end of anonymous namespace" << std::endl;
677
732
678
733
return have_collisions ? 1 : 0 ;
679
734
}
0 commit comments