~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_getopt.c

  • Committer: mordred
  • Date: 2008-11-01 00:46:20 UTC
  • mto: (572.1.1 devel) (575.1.1 devel)
  • mto: This revision was merged to the branch mainline in revision 573.
  • Revision ID: mordred@opensolaris-20081101004620-vd0kzsl9k40hvf4p
Some updates to dtrace support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
16
16
#include "mysys_priv.h"
17
 
#include <libdrizzle/gettext.h>
 
17
#include <drizzled/gettext.h>
18
18
 
19
19
#include <mystrings/m_string.h>
20
20
#include <stdlib.h>
820
820
    }
821
821
    break;
822
822
  case GET_LONG:
823
 
#if SIZEOF_LONG < SIZEOF_LONG_LONG
824
 
    if (num > (int64_t) LONG_MAX)
 
823
    if (num > (int64_t) INT32_MAX)
825
824
    {
826
 
      num= ((int64_t) LONG_MAX);
 
825
      num= ((int64_t) INT32_MAX);
827
826
      adjusted= true;
828
827
    }
829
 
#endif
830
828
    break;
831
829
  default:
832
830
    assert((optp->var_type & GET_TYPE_MASK) == GET_LL);
854
852
/*
855
853
  function: getopt_ull
856
854
 
857
 
  This is the same as getopt_ll, but is meant for unsigned long long
 
855
  This is the same as getopt_ll, but is meant for uint64_t
858
856
  values.
859
857
*/
860
858
 
888
886
    }
889
887
    break;
890
888
  case GET_ULONG:
891
 
#if SIZEOF_LONG < SIZEOF_LONG_LONG
892
 
    if (num > (uint64_t) ULONG_MAX)
 
889
    if (num > (uint64_t) UINT32_MAX)
893
890
    {
894
 
      num= ((uint64_t) ULONG_MAX);
 
891
      num= ((uint64_t) UINT32_MAX);
895
892
      adjusted= true;
896
893
    }
897
 
#endif
898
894
    break;
899
895
  default:
900
896
    assert((optp->var_type & GET_TYPE_MASK) == GET_ULL);