~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_seek.c

  • Committer: Monty Taylor
  • Date: 2008-10-08 01:52:54 UTC
  • mto: This revision was merged to the branch mainline in revision 491.
  • Revision ID: monty@inaugust.com-20081008015254-tipx2vraigbhs0j7
One step closer to simpler off_t support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
my_off_t my_seek(File fd, my_off_t pos, int whence,
46
46
                 myf MyFlags __attribute__((unused)))
47
47
{
48
 
  register os_off_t newpos= -1;
 
48
  register off_t newpos= -1;
49
49
  assert(pos != MY_FILEPOS_ERROR);              /* safety check */
50
50
 
51
51
  /*
62
62
  else
63
63
#endif
64
64
    newpos= lseek(fd, pos, whence);
65
 
  if (newpos == (os_off_t) -1)
 
65
  if (newpos == (off_t) -1)
66
66
  {
67
67
    my_errno=errno;
68
68
    return(MY_FILEPOS_ERROR);
76
76
 
77
77
my_off_t my_tell(File fd, myf MyFlags __attribute__((unused)))
78
78
{
79
 
  os_off_t pos;
 
79
  off_t pos;
80
80
  assert(fd >= 0);
81
81
#ifdef HAVE_TELL
82
82
  pos=tell(fd);
83
83
#else
84
84
  pos=lseek(fd, 0L, MY_SEEK_CUR);
85
85
#endif
86
 
  if (pos == (os_off_t) -1)
 
86
  if (pos == (off_t) -1)
87
87
    my_errno=errno;
88
88
  return((my_off_t) pos);
89
89
} /* my_tell */