According to Wikipedia
a global variable is a variable with global scope, meaning that it is visible (hence accessible) throughout the program
What do we call a variable which is not local to any function but not accessible throughout the program, only to the functions declared in the same unit as the variable, where a unit can be a file, module or a class depending on the language?
Edit: Examples would be a static variable declared at file scope in C, a private static variable in Java or a non-exported variable with module scope in Oberon.
If the scope of the variable is not known, it is called a free variable.
Otherwise the non-local variables are typically named by the scope where they were declared, i.e. "global variable", "module(-scoped) variable", "file-scoped variable", "class(-scoped) variable" or whatever else units your language has.