1
0
Fork 0

Fix Linux generation after change made to compile with MSVC 7.1

This commit is contained in:
Frederic 2009-01-22 00:34:55 +01:00 committed by Ralf Gerlich
parent 50b1465421
commit 0038e2153f
3 changed files with 8 additions and 4 deletions

View file

@ -8,7 +8,7 @@ fgfs_tools_server_LDADD = -lsgbucket -lsgmisc -lsgdebug -lsgxml $(network_LIBS)
fgfs_tools_client_SOURCES = client.cxx fgfs_tools_client_SOURCES = client.cxx
fgfs_tools_client_LDADD = -lsgbucket -lsgmisc -lsgdebug -lsgxml $(network_LIBS) fgfs_tools_client_LDADD = -lsgbucket -lsgmisc -lsgdebug -lsgxml $(network_LIBS) -lplibul
INCLUDES = \ INCLUDES = \
-I$(top_srcdir)/src \ -I$(top_srcdir)/src \

View file

@ -346,7 +346,11 @@ void alloc_new_tile( int msgsock, long int next_tile, const string &status_dir )
if ( send(msgsock, message, length, 0) < 0 ) { if ( send(msgsock, message, length, 0) < 0 ) {
perror("Cannot write to stream socket"); perror("Cannot write to stream socket");
} }
#ifdef _MSC_VER
closesocket(msgsock); closesocket(msgsock);
#else
close(msgsock);
#endif
// cout << "process for " << next_tile << " ended" << endl; // cout << "process for " << next_tile << " ended" << endl;
} }

View file

@ -135,7 +135,7 @@ void gen_clipped_polygon( const TGPolygon& shape, const TGPolygon& clip ) {
int main( int argc, char **argv ) { int main( int argc, char **argv ) {
struct GSHHS h; struct GSHHS h;
struct POINT p; struct GSHHS_POINT p;
TGPolygon shape, clip; TGPolygon shape, clip;
double w, e, s, n, area, lon, lat; double w, e, s, n, area, lon, lat;
int k, max_east = 270000000; int k, max_east = 270000000;
@ -187,8 +187,8 @@ int main( int argc, char **argv ) {
cout << "Loading shape" << endl; cout << "Loading shape" << endl;
for ( k = 0; k < h.n; k++ ) { for ( k = 0; k < h.n; k++ ) {
if ( gzread(fp, (void *)&p, (unsigned)sizeof(struct POINT)) != if ( gzread(fp, (void *)&p, (unsigned)sizeof(struct GSHHS_POINT)) !=
(unsigned)sizeof(struct POINT) ) (unsigned)sizeof(struct GSHHS_POINT) )
{ {
SG_LOG( SG_GENERAL, SG_ALERT, "Error reading file for polygon " SG_LOG( SG_GENERAL, SG_ALERT, "Error reading file for polygon "
<< h.id << " point " << k ); << h.id << " point " << k );