Is there any way for a compiled command-line program to tell bash or csh that it does not want any wildcard characters in its parameters expanded?
For instance, one
The expansion is performed by the shell before your program is run. Your program has no clue as to whether expansion has occurred or not.
set -o noglob
will switch off expansion in the invoking shell, but you'd have to do that before you invoke your program.
The alternative is to quote your arguments e.g.
foo "*"