Naming of variables - errors

Ever since compiling LAMMPS on cygwin, I had to manually patch two
variables in pair_meam headers in order to get it compiled on
cygwin/64.

src\pair_meam_spline.h
77: void init(int _N, double _deriv0, double _derivN) {
              N = _N;

to
77: void init(int _N_, double _deriv0, double _derivN) {
              N = _N_;

and

src\pair_meam_sw_spline.h:
77: void init(int _N, double _deriv0, double _derivN) {
              N = _N;

to
77: void init(int _N_, double _deriv0, double _derivN) {
              N = _N_;

Aside from beeing a non-standard compliant name, there
is a macro of that name in /CygWin/usr/include/ctype.h
which reads:

35: #define _N 04

which seems to be the fun killer here. Maybe someone
could please improve the variable naming in order to
make it easier for the cygwin users?

Thank you in advance

M.

I think this can be patched easily because “N" is a local var. Just rename it to "N” instead of “N” to be on the safe side of the standard. The attached files compile at least, I am fairly certain they also should work as expected.

Don’t know if a real hacker can do a “find all variables that start with an underscore followed by a capital” to see if other files need fixing.

pair_meam_spline.h (13 KB)

pair_meam_sw_spline.h (26.2 KB)