Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
bgColor#ffcccc
LDAP *ld = ldap_init("localhost", 1234);
if ( ld == NULL) {
  perror("ldap_init");
  return(1);
}

...

Code Block
bgColor#ccccff
#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);
}

...