Print this page
5910 libnisdb won't build with modern GCC

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libnisdb/db_table.cc
          +++ new/usr/src/lib/libnisdb/db_table.cc
↓ open down ↓ 16 lines elided ↑ open up ↑
  17   17   * fields enclosed by brackets "[]" replaced with your own identifying
  18   18   * information: Portions Copyright [yyyy] [name of copyright owner]
  19   19   *
  20   20   * CDDL HEADER END
  21   21   */
  22   22  /*
  23   23   *      db_table.cc
  24   24   *
  25   25   * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  26   26   * Use is subject to license terms.
       27 + *
       28 + * Copyright 2015 RackTop Systems.
  27   29   */
  28   30  
  29   31  #include <stdio.h>
  30   32  #include <malloc.h>
  31   33  #include <string.h>
  32   34  #include <stdlib.h>             /* srand48() */
  33   35  #include <lber.h>
  34   36  #include <ldap.h>
  35   37  #include "db_headers.h"
  36   38  #include "db_table.h"
↓ open down ↓ 30 lines elided ↑ open up ↑
  67   69          int             i;
  68   70  
  69   71          /* Compute ~0 for an unknown length integer */
  70   72          for (i = 0; i < sizeof (time_t); i++) {
  71   73                  b[i] = 0xff;
  72   74          }
  73   75          /* Set maxTimeT to ~0 of appropriate length */
  74   76          (void) memcpy(&maxTimeT, b, sizeof (time_t));
  75   77  
  76   78          if (maxTimeT < 1)
  77      -                maxTimeT = ~(1<<((8*sizeof (maxTimeT))-1));
       79 +                maxTimeT = ~(1L<<((8*sizeof (maxTimeT))-1));
  78   80  }
  79   81  #pragma init(__setMaxTimeT)
  80   82  }
  81   83  
  82   84  /* How much to grow table by */
  83   85  #define DB_TABLE_GROWTH_INCREMENT 1024
  84   86  
  85   87  /* 0'th not used; might be confusing. */
  86   88  #define DB_TABLE_START 1
  87   89  
↓ open down ↓ 1065 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX