When compiling sqlite3.c for the iOS platform, the compiler emits a custom
warning "gethostuuid() is disabled”, triggered by a #warn directive (see code
below.)
I understand why gethostuuid() isn’t available: the iOS platform intentionally
blocks 3rd party apps from accessing device-specific UUIDs, to avoid privacy
problems caused by ad networks that try to correlate a user’s activity across
apps or across reinstalls of an app.
What I don’t understand is why SQLite would want to call gethostuuid(), or what
functionality might be lost by its absence.
Also, usually a compiler warning means the developer is doing something
questionable or dangerous; but in this case the warning is triggered simply by
the presence of a target platform, which isn’t something the developer has any
control over. So it doesn’t seem useful to produce this warning when there’s
nothing that can be done about it.
—Jens
PS: The code that triggers the warning is:
#if defined(__APPLE__) && ((__MAC_OS_X_VERSION_MIN_REQUIRED > 1050) || \
(__IPHONE_OS_VERSION_MIN_REQUIRED > 2000))
# if (!defined(TARGET_OS_EMBEDDED) || (TARGET_OS_EMBEDDED==0)) \
&& (!defined(TARGET_IPHONE_SIMULATOR) || (TARGET_IPHONE_SIMULATOR==0))
# define HAVE_GETHOSTUUID 1
# else
# warning "gethostuuid() is disabled."
# endif
#endif
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users