Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I remove the CPL_CVSID macro? #11433

Open
schwehr opened this issue Dec 4, 2024 · 2 comments
Open

Can I remove the CPL_CVSID macro? #11433

schwehr opened this issue Dec 4, 2024 · 2 comments
Assignees

Comments

@schwehr
Copy link
Member

schwehr commented Dec 4, 2024

Feature description

Any objections to me removing the CPL_CVSID() macro? It's no longer present in any source files? Are there any uses of GDAL that count on CPL_CVSID being present?

Happy to make a PR, but want to check first.

find . -type f | grep -v 'git/' | egrep -v 'static/Sustainable|doc/images' | xargs grep -i cvsid | cut -c-100
./ogr/ogrsf_frmts/shape/dump_symbols.sh:rodata_symbol_list=$(objdump -t shapelib.so  | grep "\\.roda
./port/cpl_port.h: * Define CPL_CVSID() macro.  It can be disabled during a build by
./port/cpl_port.h: * defining DISABLE_CVSID in the compiler options.
./port/cpl_port.h: * The cvsid_aw() function is just there to prevent reports of cpl_cvsid()
./port/cpl_port.h:#ifndef DISABLE_CVSID
./port/cpl_port.h:#define CPL_CVSID(string)                                                      \
./port/cpl_port.h:    static const char cpl_cvsid[] __attribute__((used)) = string;
./port/cpl_port.h:#define CPL_CVSID(string)                                                      \
./port/cpl_port.h:    static const char cpl_cvsid[] = string;                                    \
./port/cpl_port.h:    static const char *cvsid_aw()                                              \
./port/cpl_port.h:        return (cvsid_aw() ? NULL : cpl_cvsid);                                \
./port/cpl_port.h:#define CPL_CVSID(string)
./NEWS-1.x.md:o Added use of CPL_CVSID macro in most source files. Running the RCS ident
./doc/source/development/rfc/rfc2_svn.rst:   CPL_CVSID("$Id: RFC2_SVN.dox 10627 2007-01-17 05:20:16Z
./doc/source/development/rfc/rfc2_svn.rst:   CPL_CVSID("$Id: RFC2_SVN.dox 10627 2007-01-17 05:20:16Z

Additional context

No response

@rouault
Copy link
Member

rouault commented Dec 4, 2024

Looking at https://codesearch.debian.net/search?q=CPL_CVSID and confirming with https://github.com/search?q=repo%3AOSGeo%2Fgdal-grass%20CPL_CVSID&type=code, OSGeo/gdal-grass is a known user of the macro (hopefully the only one... ?) . So a preliminary step would be to remove its use from there, wait for an official release of OSGeo/gdal-grass, and then remove it here

rouault added a commit to rouault/gdal-grass that referenced this issue Dec 4, 2024
This macro dates back to CVS time and would only make sense if we
substituted the $Id$, which we don't do.
We also plan to remove the macro from GDAL's cpl_port.h header in
OSGeo/gdal#11433 , so let's remove use
of it by its only known external user :-)
@rouault
Copy link
Member

rouault commented Dec 4, 2024

gdal-grass pull request removing their use of CPL_CVSID: OSGeo/gdal-grass#50

neteler pushed a commit to OSGeo/gdal-grass that referenced this issue Dec 5, 2024
This macro dates back to CVS time and would only make sense if we
substituted the $Id$, which we don't do.
We also plan to remove the macro from GDAL's cpl_port.h header in
OSGeo/gdal#11433 , so let's remove use
of it by its only known external user :-)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants