#include <pwd.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
int main(){
struct passwd* pw;
pw = getpwuid(getuid());
if(pw == NULL)
printf("pw is NULL pointer.\n");
else
printf("pw is not NULL pointer.\n");
return 0;
}
以上程序,分别使用动态链接和静态链接,运行时打印的语句不一样,何解?