[SERVER-3671] change VERSION to PDFILE_VERSION Created: 22/Aug/11 Updated: 11/Jul/16 Resolved: 22/Oct/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Build |
| Affects Version/s: | None |
| Fix Version/s: | 2.1.0 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Adam Magaluk | Assignee: | Eliot Horowitz (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Debian Linux Squeeze 32bit |
||
| Operating System: | ALL |
| Participants: |
| Description |
|
Seems to be some comparability with linking against your library when using autoconf as autoconf defines VERSION. In file pch.h on lines 106 // pdfile versions Its bad practice to declare a constant as common as VERSION without even doing a #ifdef before. My suggestion would be to rename VERSION to PDFILE_VERSION. |
| Comments |
| Comment by auto [ 22/Oct/11 ] |
|
Author: {u'login': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}Message: use PDFILE_VERSION instead of VERSION since its such a common name |
| Comment by Eliot Horowitz (Inactive) [ 22/Aug/11 ] |
|
we can change. |
| Comment by Adam Magaluk [ 22/Aug/11 ] |
|
Another possible fix to allow mongo::VERSION to still be declared as such, #ifdef VERSION |
| Comment by Adam Magaluk [ 22/Aug/11 ] |
|
I see that, but if VERSION is defined using a preprocessor then it generates an error. I put #define VERSION in my header or generated by autoconf before including mong/client/dbclient.h /usr/include/mongo/client/../pch.h:108: error: expected unqualified-id before numeric constant Compiling with gcc version 4.4.5 (Debian 4.4.5-8) |
| Comment by Eliot Horowitz (Inactive) [ 22/Aug/11 ] |
|
Its inside of a namespace, so its not VERSION its mongo::VERSION |