Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Start of work on improving the platform detection in the native library pre-loading code. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | preLoad |
Files: | files | file ages | folders |
SHA1: |
621d22239e46b78c5f24eb89bfff340f |
User & Date: | mistachkin 2012-04-02 17:58:46.312 |
Context
2012-04-03
| ||
03:18 | Clarify comments and semantics of the process 'bitness' checking in the native library pre-loading code. Closed-Leaf check-in: 77969440cd user: mistachkin tags: preLoad | |
2012-04-02
| ||
17:58 | Start of work on improving the platform detection in the native library pre-loading code. check-in: 621d22239e user: mistachkin tags: preLoad | |
2012-03-31
| ||
22:23 | Minor enhancements to release archive verification tool. check-in: 377c46ce48 user: mistachkin tags: trunk | |
Changes
Changes to System.Data.SQLite/UnsafeNativeMethods.cs.
︙ | |||
82 83 84 85 86 87 88 89 | 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + | /// This lock is used to protect the static _SQLiteModule and /// processorArchitecturePlatforms fields, below. /// </summary> private static readonly object staticSyncRoot = new object(); ///////////////////////////////////////////////////////////////////////// /// <summary> /// This class represents the concept of a platform as understood by the /// native library pre-loading code. /// </summary> private sealed class Platform { #region Private Data private string name; private int bits; #endregion ///////////////////////////////////////////////////////////////////// #region Public Constructors public Platform( string name, int bits ) { this.name = name; this.bits = bits; } #endregion ///////////////////////////////////////////////////////////////////// #region Public Properties /// <summary> /// The name of the platform. This is used to help locate the /// native library to pre-load. /// </summary> public string Name { get { return name; } } ///////////////////////////////////////////////////////////////////// /// <summary> /// The number of bits needed to represent memory addresses on this /// platform. /// </summary> public int Bits { get { return bits; } } #endregion } ///////////////////////////////////////////////////////////////////////// /// <summary> /// Stores the mappings between processor architecture names and platform |
︙ | |||
128 129 130 131 132 133 134 135 | 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 | + + + + + - + + + + + + - - - + + + + + + + + | // // TODO: Make sure this list is updated if the supported // processor architecture names and/or platform names // changes. // if (processorArchitecturePlatforms == null) { // // NOTE: Create the map of processor architecture names // to platform names using a case-insensitive string // comparer. // processorArchitecturePlatforms = |
︙ | |||
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 | 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 | + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + - + + + + + + + + + + + + + + + + + + + + | } return fileName; } ///////////////////////////////////////////////////////////////////////// /// <summary> /// Determines and then returns the number of bits used to represent /// memory addresses for the current process. /// </summary> /// <returns> /// The number of bits used to represent memory addresses for the /// current process or zero if this value cannot be determined. /// </returns> private static int GetProcessBits() { return IntPtr.Size * 8; } ///////////////////////////////////////////////////////////////////////// /// <summary> /// Queries and returns the processor architecture of the current /// process. /// </summary> /// <returns> /// The processor architecture of the current process -OR- null if it /// cannot be determined. Always returns an empty string when running on /// the .NET Compact Framework. /// </returns> private static string GetProcessorArchitecture() { #if !PLATFORM_COMPACTFRAMEWORK // // NOTE: If the "PreLoadSQLite_ProcessorArchitecture" environment // variable is set, use it verbatim for the current processor // architecture. // string processorArchitecture = Environment.GetEnvironmentVariable( "PreLoadSQLite_ProcessorArchitecture"); if (processorArchitecture != null) return processorArchitecture; // |
︙ | |||
280 281 282 283 284 285 286 | 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 | - + - + - - - - - - - - - - - + - + | return null; lock (staticSyncRoot) { if (processorArchitecturePlatforms == null) return null; |
︙ |