[CDRIVER-2015] Detect socket API param types with Autotools for HP-UX Created: 02/Feb/17 Updated: 15/Mar/17 Resolved: 15/Mar/17 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | Build, libmongoc |
| Affects Version/s: | 1.6.0 |
| Fix Version/s: | 1.6.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Aleksander Melnikov | Assignee: | A. Jesse Jiryu Davis |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
HPUX 11.31 |
||
| Issue Links: |
|
||||||||||||
| Description |
|
mongoc_socklen_t must choice type on HPUX by checking _XOPEN_SOURCE_EXTENDED |
| Comments |
| Comment by Aleksander Melnikov [ 15/Mar/17 ] | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by A. Jesse Jiryu Davis [ 15/Mar/17 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
r1.6: https://github.com/mongodb/mongo-c-driver/commit/33a0d77966c796a7037350f3f9d9fcf87dccc247 | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Githook User [ 15/Mar/17 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by A. Jesse Jiryu Davis [ 15/Mar/17 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
Cool! If you offer a pull request here we can try it out: https://github.com/mongodb/mongo-c-driver/blob/master/CMakeLists.txt Please put " | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Aleksander Melnikov [ 15/Mar/17 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
I'm propose next contribution to CMakeLists.txt:
| |||||||||||||||||||||||||||||||||||||||||||||
| Comment by A. Jesse Jiryu Davis [ 15/Mar/17 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
Thanks! If you'd like to update our CMakeLists.txt to work well on HP-UX too, then I'd appreciate your contribution. | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Aleksander Melnikov [ 15/Mar/17 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
My mistake, sorry. | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by A. Jesse Jiryu Davis [ 15/Mar/17 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
Hmm, on my system I get:
The third argument is set to "int" on my system, not to "socklen_t". My system is HP-UX 11.31 rented from SiteOx.com:
This is a big-endian machine:
Maybe I don't really understand this issue. But it seems to me that with my new configure check, if your system can compile a call to "accept()" with types "struct sockaddr" and "socklen_t *", then those are the right parameter types for your system. Is that true, or can you explain to me why I'm wrong? | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Aleksander Melnikov [ 10/Mar/17 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
looks better, but produce same output:
How about add the following check:
| |||||||||||||||||||||||||||||||||||||||||||||
| Comment by A. Jesse Jiryu Davis [ 09/Mar/17 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
Thanks Aleksander, how does this look to you?: https://github.com/ajdavis/mongo-c-driver/commit/2266c96a4a4c66e61ee272f5c5d64f755c52e826 | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Aleksander Melnikov [ 09/Mar/17 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
As the HPUX have socklen_t type, it is set to aviable in mongoc-config.h:
the next define set mongoc_socklen_t to socklen_t
Not all call replaced by new defines:
by this way, of implementation the type mongoc_socklen_t probably unnecessary. | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by A. Jesse Jiryu Davis [ 08/Mar/17 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
Thanks! I've tested it once on a HPUX machine I rented from SiteOx. If you can confirm it works on your system, I would appreciate it. | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Aleksander Melnikov [ 08/Mar/17 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
I will try to test | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by A. Jesse Jiryu Davis [ 08/Mar/17 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
r1.6: https://github.com/mongodb/mongo-c-driver/commit/6e24289417568c013f2c83f1ed4b1da94711d524 | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Githook User [ 08/Mar/17 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: Call getpeername and getsockopt with the right parameters on each | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by A. Jesse Jiryu Davis [ 02/Feb/17 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
Thanks for the info! | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Aleksander Melnikov [ 02/Feb/17 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
more info here https://github.com/mongodb/mongo-c-driver/pull/409#issuecomment-276873933 |