typedef struct _ibm_func {
pf_goto_hell goto_hell;
} ibm_func;
typedef struct _sun_func {
pf_goto_hell goto_hell;
} sun_func;
......
ibm_func fibm;
sun_func fsun;
fibm.goto_hell = ...;
fsun.goto_hell = ...;
......
定義一模一樣都沒問題,
放到結構體裏面,動態加載嘛,程序初始化的時候,加載一遍,
比如,ibm函數全部放到ibm_func,
但是,sun也有自己的實現,那麼,放到另一個結構體裏面,
當然,結構體只是爲了管理方便,思路是用指針保存起來,