~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_getopt.c

  • Committer: Brian Aker
  • Date: 2008-10-07 15:13:28 UTC
  • mfrom: (481.1.19 codestyle)
  • Revision ID: brian@tangent.org-20081007151328-m49yev7qggqmzxg1
Mergining Monty's work

Show diffs side-by-side

added added

removed removed

Lines of Context:
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);