Revision 1912 trunk/src/linad99/gradstak.cpp

gradstak.cpp (revision 1912)
281 281

  
282 282
    // save the current end of file in case we can't write the whole buffer
283 283
    end_pos = lseek(_GRADFILE_PTR,0L,SEEK_CUR);
284
    #if !defined(__NDPX__ ) && !defined(__SUN__)  && !defined(__GNU__)
284
#if defined(_MSC_VER)
285 285
    ierr = write(_GRADFILE_PTR, ptr_first, nbw);
286
    #else
286
#else
287 287
    ierr = write(_GRADFILE_PTR, (char*)ptr_first, nbw);
288
    #endif
288
#endif
289 289

  
290 290
    if  (ierr != nbw)
291 291
    {
......
294 294
      //save the end of file for this file so we can reposition later
295 295
      end_pos1 = end_pos;
296 296
      increment_current_gradfile_ptr();
297
      #if !defined(__NDPX__ ) && !defined(__SUN__)   && !defined(__GNU__)
297
#if defined(_MSC_VER)
298 298
      ierr = write(_GRADFILE_PTR, ptr_first, nbw);
299
      #else
299
#else
300 300
      ierr = write(_GRADFILE_PTR, (char*)ptr_first, nbw);
301
      #endif
301
#endif
302 302

  
303 303
      if  (ierr != nbw)
304 304
      {
305 305
        perror("Error writing to temporary gradient stack file");
306 306
        cerr <<"   File name: " << gradfile_name << "\n";
307
        #if !defined(__NDPX__ ) && !defined(__SUN__)   && !defined(__GNU__)
307
#if defined(_MSC_VER)
308 308
        cerr <<"   File length: "
309 309
             << filelength(_GRADFILE_PTR)
310 310
             << " bytes.\n";
311
        #endif
311
#endif
312 312
        cerr <<"   Attempting to write " << nbw <<" bytes; wrote " << ierr
313 313
        << ".\n";
314 314
        exit(1);

Also available in: Unified diff