Skip to content

Commit

Permalink
Portability fix for Mingw32 compiler.
Browse files Browse the repository at this point in the history
git-svn-id: https://ctags.svn.sourceforge.net/svnroot/ctags/trunk@63 c5d04d22-be80-434c-894e-aa346cc9e8e8
  • Loading branch information
Darren Hiebert committed Jan 1, 2002
1 parent 15a3006 commit 6bafb31
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Current Version: @@VERSION@@

ctags-5.2.1 (Tue Jan 01 2002)
* Portabilitiy fixes [Mingw32].

ctags-5.2 (Sun Dec 23 2001)
* Portabilitiy fixes [HP-UX, Solaris, VMS, OS/2].
* Made code compilable by a C++ compiler.
Expand Down
1 change: 1 addition & 0 deletions general.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ typedef enum { FALSE, TRUE } boolean;
/* Work-around for broken implementation of fgetpos()/fsetpos() on Mingw32 */
#if defined (__MINGW32__) && defined (__MSVCRT__)
# undef HAVE_FGETPOS
# define NEED_PROTO_FGETPOS 1
#endif

/*
Expand Down
8 changes: 2 additions & 6 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -538,9 +538,7 @@ extern boolean doesFileExist (const char *const fileName)

#ifndef HAVE_FGETPOS

extern int fgetpos ( stream, pos )
FILE *const stream;
fpos_t *const pos;
extern int fgetpos (FILE *stream, fpos_t *pos)
{
int result = 0;

Expand All @@ -551,9 +549,7 @@ extern int fgetpos ( stream, pos )
return result;
}

extern int fsetpos ( stream, pos )
FILE *const stream;
fpos_t *const pos;
extern int fsetpos (FILE *stream, fpos_t const *pos)
{
return fseek (stream, *pos, SEEK_SET);
}
Expand Down
4 changes: 2 additions & 2 deletions read.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ extern CONST_FILE inputFile File;
/*
* FUNCTION PROTOTYPES
*/
#ifdef NEED_PROTO_FGETPOS
#if defined(NEED_PROTO_FGETPOS)
extern int fgetpos (FILE *stream, fpos_t *pos);
extern int fsetpos (FILE *stream, const fpos_t *pos);
extern int fsetpos (FILE *stream, fpos_t *pos);
#endif

extern void freeSourceFileResources (void);
Expand Down

0 comments on commit 6bafb31

Please sign in to comment.