...
Code Block | ||
---|---|---|
| ||
LDAP *ld = ldap_init("localhost", 1234);
if ( ld == NULL) {
perror("ldap_init");
return(1);
}
|
...
Code Block | ||
---|---|---|
| ||
#ifndef PORTNUMBER /* might be passed on compile line */ # define PORTNUMBER 1234 #endif #ifndef HOSTNAME /* might be passed on compile line */ # define HOSTNAME "localhost" #endif /* ... */ LDAP *ld = ldap_init("localhost"HOSTNAME, 1234PORTNUMBER); if ( ld == NULL) { perror("ldap_init"); return(1); } |
...