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

Lots and lots of preprocessor defines in bacio.c that are never set #55

Closed
edwardhartnett opened this issue Oct 7, 2021 · 0 comments · Fixed by #76
Closed

Lots and lots of preprocessor defines in bacio.c that are never set #55

edwardhartnett opened this issue Oct 7, 2021 · 0 comments · Fixed by #76
Assignees
Labels
enhancement New feature or request

Comments

@edwardhartnett
Copy link
Contributor

In bacio.c we have code like this:

#ifdef CRAY90
  #include <fortran.h>
  int BACIO
         (int * mode, int * start, int *newpos, int * size, int * no,
          int * nactual, int * fdes,
          _fcd fcd_fname, _fcd fcd_datary) {
  char *fname, *datary;
  int namelen;
#endif
#ifdef HP
  int bacio
         (int * mode, int * start, int *newpos, int * size, int * no,
          int * nactual, int * fdes, const char *fname, char *datary,
          int  namelen, int  datanamelen) {
#endif
#ifdef SGI
  int bacio_
         (int * mode, int * start, int *newpos, int * size, int * no,
          int * nactual, int * fdes, const char *fname, char *datary,
          int  namelen, int  datanamelen) {
#endif
#ifdef LINUX
  int bacio_
         (int * mode, int * start, int *newpos, int * size, int * no,
          int * nactual, int * fdes, const char *fname, char *datary,
          int  namelen, int  datanamelen) {
#endif
#ifdef LINUXF90
  int BACIO
         (int * mode, int * start, int *newpos, int * size, int * no,
          int * nactual, int * fdes, const char *fname, char *datary,
          int  namelen, int  datanamelen) {
#endif
#ifdef APPLE
  int bacio_
         (int * mode, int * start, int *newpos, int * size, int * no,
          int * nactual, int * fdes, const char *fname, char *datary,
          int  namelen, int  datanamelen) {
#endif
#ifdef VPP5000
  int bacio_
         (int * mode, int * start, int *newpos, int * size, int * no,
          int * nactual, int * fdes, const char *fname, char *datary,
          int  namelen, int  datanamelen) {
#endif
#ifdef IBM4
  int bacio
         (int * mode, int * start, int *newpos, int * size, int * no,
          int * nactual, int * fdes, const char *fname, char *datary,
          int  namelen, int  datanamelen) {
#endif
#ifdef IBM8
  long long int bacio
         (long long int * mode, long long int * start, long long int *newpos,
          long long int * size, long long int * no,
          long long int * nactual, long long int * fdes, const char *fname,
          char *datary,
          long long int  namelen, long long int  datanamelen) {
#endif

Yet in the build system we have:

add_compile_definitions(UNDERSCORE)
if(APPLE)
  add_compile_definitions(APPLE)
elseif(UNIX)
  add_compile_definitions(LINUX)
endif()

So it looks like LINUX and APPLE are the only two we are using. And they are the same, so we could just declare the function bacio_ without worrying about these preprocessor symbols.

@edwardhartnett edwardhartnett changed the title Lots and lots of preprocessor defines that are never set Lots and lots of preprocessor defines in bacio.c that are never set Oct 7, 2021
@edwardhartnett edwardhartnett self-assigned this Oct 7, 2021
@edwardhartnett edwardhartnett added the enhancement New feature or request label Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant