From: short <> Date: Fri, 14 Dec 2001 21:34:20 +0000 (+0000) Subject: Fixed fatal linker error (global symbol conflict of "writephonebook") X-Git-Tag: bp_lace_printsms X-Git-Url: http://git.jankratochvil.net/?p=gnokii.git;a=commitdiff_plain;h=refs%2Fheads%2Flace_writephonebook Fixed fatal linker error (global symbol conflict of "writephonebook") - all the _local_ function symbols of gnokii.c should be static, they are just polluting the global namespace when present in "gnokii.h"! --- diff --git a/gnokii/gnokii.c b/gnokii/gnokii.c index 120a83f..1080b3d 100644 --- a/gnokii/gnokii.c +++ b/gnokii/gnokii.c @@ -284,6 +284,8 @@ int checkargs(int opt, struct gnokii_arg_len gals[], int argc) else return 1; } +static int writephonebook(int argc, char *args[]); + /* Main function - handles command line arguments, passes them to separate functions accordingly. */ int main(int argc, char *argv[]) @@ -2452,7 +2454,7 @@ int getmemory(int argc, char *argv[]) /* Read data from stdin, parse and write to phone. The parsing is relatively crude and doesn't allow for much variation from the stipulated format. */ /* FIXME: I guess there's *very* similar code in xgnokii */ -int writephonebook(int argc, char *args[]) +static int writephonebook(int argc, char *args[]) { GSM_PhonebookEntry entry; GSM_Error error; diff --git a/include/gnokii.h b/include/gnokii.h index ed5dd01..ed10094 100644 --- a/include/gnokii.h +++ b/include/gnokii.h @@ -13,6 +13,11 @@ Header file for test utility. $Log$ + Revision 1.1.1.1.2.1.2.1 2001/12/14 21:34:20 short + Fixed fatal linker error (global symbol conflict of "writephonebook") + - all the _local_ function symbols of gnokii.c should be static, + they are just polluting the global namespace when present in "gnokii.h"! + Revision 1.1.1.1.2.1 2001/12/14 20:54:44 short Update: orig2001_12_04_22_45 -> orig2001_12_14_20_46 @@ -49,7 +54,6 @@ int monitormode(void); #endif int getmemory(int argc, char *argv[]); -int writephonebook(int argc, char *argv[]); int getspeeddial(char *number); int setspeeddial(char *argv[]); int getsms(int argc, char *argv[]);