Opened 16 years ago
Closed 15 years ago
#330 closed defect (fixed)
#includes should use C++ form rather than C form
Reported by: | Richard Boulton | Owned by: | Olly Betts |
---|---|---|---|
Priority: | normal | Milestone: | 1.1.2 |
Component: | Other | Version: | SVN trunk |
Severity: | minor | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Operating System: | All |
Description
According to xapian-core/HACKING:
For standard ISO C headers, we now prefer the C++ form for ISO C headers (e.g. "#include <cstdlib>" rather than "#include <stdlib.h>") for new code (a *lot* of the existing code currently uses the old form, but there are a few semantic differences, so we're holding off on a wholesale conversion until 1.1.0 to avoid potentially disruptive changes with no direct benefit to users).
This ticket is just to remind us to do this. Since 1.1.x is a development series, I don't think it needs to be done for 1.1.0, but I'm marking this for 1.1.0 since we should at least change HACKING if we don't do it for that release.
Change History (3)
comment:1 by , 16 years ago
Milestone: | 1.1.0 → 1.1.1 |
---|
comment:2 by , 16 years ago
Milestone: | 1.1.1 → 1.1.4 |
---|---|
Status: | new → assigned |
comment:3 by , 15 years ago
Milestone: | 1.1.4 → 1.1.2 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Fixed for xapian-core in r13002. Fixed for omega in r13003 except uses of stdint.h - I worry about portability of cstdint since stdint.h was added by C99. Uses in xapian-bindings are generated by SWIG. Script to update automatically in xapian-maintainer-tools/c++stdcheaders so that branches can be easily updated and to fix any future regressions.
I think making this change would be unhelpful while we have several unmerged branches and unapplied patches as it will touch a lot of files and create conflicts in many cases. It'll also add work when backporting some fixes too. But it would be good to do it a decent time before 1.2.0 in case it causes any problems.
I don't see this needs to block 1.1.0 either - "until 1.1.0" could mean "until after 1.1.0" - but feel free to reword if you want.