Content-Length: 270953 | pFad | http://github.com/tonybelloni/postgres/commit/b86515da1a73d0a2e23aca728f18b5f9e809e89f

1F Give a useful error message if uuid-ossp is built without preconfigur… · tonybelloni/postgres@b86515d · GitHub
Skip to content

Commit b86515d

Browse files
committed
Give a useful error message if uuid-ossp is built without preconfiguration.
Before commit b8cc8f9, it was possible to build contrib/uuid-ossp without having told configure you meant to; you could just cd into that directory and "make". That no longer works because the code depends on configure to have done header and library probes, but the ensuing error messages are not so easy to interpret if you're not an old C hand. We've gotten a couple of complaints recently from people trying to do this the low-tech way, so add an explicit #error directing the user to use --with-uuid. (In principle we might want to do something similar in the other optionally-built contrib modules; but I don't think any of the others have ever worked without preconfiguration, so there are no bad habits to break people of.) Back-patch to 9.4 where the previous commit came in. Report: https://postgr.es/m/CAHeEsBf42AWTnk=1qJvFv+mYgRFm07Knsfuc86Ono8nRjf3tvQ@mail.gmail.com Report: https://postgr.es/m/CAKYdkBrUaZX+F6KpmzoHqMtiUqCtAW_w6Dgvr6F0WTiopuGxow@mail.gmail.com
1 parent 4032ef1 commit b86515d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

contrib/uuid-ossp/uuid-ossp.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@
3030
*/
3131
#define uuid_hash bsd_uuid_hash
3232

33-
#ifdef HAVE_UUID_H
33+
#if defined(HAVE_UUID_H)
3434
#include <uuid.h>
35-
#endif
36-
#ifdef HAVE_OSSP_UUID_H
35+
#elif defined(HAVE_OSSP_UUID_H)
3736
#include <ossp/uuid.h>
38-
#endif
39-
#ifdef HAVE_UUID_UUID_H
37+
#elif defined(HAVE_UUID_UUID_H)
4038
#include <uuid/uuid.h>
39+
#else
40+
#error "please use configure's --with-uuid switch to select a UUID library"
4141
#endif
4242

4343
#undef uuid_hash

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/tonybelloni/postgres/commit/b86515da1a73d0a2e23aca728f18b5f9e809e89f

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy