summaryrefslogtreecommitdiff
blob: d81e260cd6decfc9c4d6607c5476bfca0ab5847b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
diff -r 0ffb61b8c31d -r 88ac9824fc14 src/client/fs/fs_afs.cpp
--- a/src/client/fs/fs_afs.cpp	Tue Sep 04 21:36:14 2007 +0200
+++ b/src/client/fs/fs_afs.cpp	Tue Sep 04 21:43:30 2007 +0200
@@ -285,10 +285,10 @@ void CAfsPart::printfInformations()
   getStdInfos(szText, sizeof(szText), false); 
   
   SNPRINTF(szFullText, i18n("%s" // standard infos
-			    "Allocation groups count:......%lu\n"
-			    "Byte order:...................%lu\n"
-			    "Blocks per group:.............%lu\n"
-			    "Boot loader size:.............%lu blocks\n"),
+			    "Allocation groups count:......%u\n"
+			    "Byte order:...................%u\n"
+			    "Blocks per group:.............%u\n"
+			    "Boot loader size:.............%u blocks\n"),
 	   szText, m_info.dwAllocGroupCount, m_info.dwByteOrder,
 	   m_info.dwBlockPerGroup, m_info.dwBootLoaderSize);
   
diff -r 0ffb61b8c31d -r 88ac9824fc14 src/client/fs/fs_base.cpp
--- a/src/client/fs/fs_base.cpp	Tue Sep 04 21:36:14 2007 +0200
+++ b/src/client/fs/fs_base.cpp	Tue Sep 04 21:43:30 2007 +0200
@@ -14,6 +14,9 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  ***************************************************************************/
+
+#define __STDC_FORMAT_MACROS
+#include <inttypes.h>
 
 #include "fs_base.h"
 #include "partimage.h"
@@ -727,10 +730,10 @@ int CFSBase::getStdInfos(char *szDest, i
 
   if (bShowBlocksInfo)
     {
-      SNPRINTF(szBlocksInfo, i18n("Block size....................%llu bytes\n"
-				  "Total blocks count............%llu\n"
-				  "Used blocks count.............%llu\n"
-				  "Free blocks count.............%llu\n"),
+      SNPRINTF(szBlocksInfo, i18n("Block size....................%"PRIu64" bytes\n"
+				  "Total blocks count............%"PRIu64"\n"
+				  "Used blocks count.............%"PRIu64"\n"
+				  "Free blocks count.............%"PRIu64"\n"),
 	       m_header.qwBlockSize, 
 	       m_header.qwBlocksCount,
 	       m_header.qwUsedBlocks,
@@ -742,7 +745,7 @@ int CFSBase::getStdInfos(char *szDest, i
     }
  
   snprintf(szDest, nMaxLen, i18n("%s" // Blocks infos
-				 "Space usage:..................%llu %%\n"
+				 "Space usage:..................%"PRIu64" %%\n"
 				 "Used space....................%s\n"
 				 "Free space....................%s\n"
 				 "Bitmap size...................%s\n"
diff -r 0ffb61b8c31d -r 88ac9824fc14 src/client/fs/fs_ext2.cpp
--- a/src/client/fs/fs_ext2.cpp	Tue Sep 04 21:36:14 2007 +0200
+++ b/src/client/fs/fs_ext2.cpp	Tue Sep 04 21:43:30 2007 +0200
@@ -103,12 +103,12 @@ void CExt2Part::printfInformations()
   getStdInfos(szText, sizeof(szText), false); 
   
   SNPRINTF(szFullText, i18n("%s" // standard infos
-			    "Number of groups..............%lu\n"
-			    "First block...................%lu\n"
+			    "Number of groups..............%u\n"
+			    "First block...................%u\n"
 			    "Ext3fs journalization.........%s\n"
 			    "Sparse super block............%s\n"
 			    "Large files support...........%s\n"
-			    "File system revision..........%lu\n"),
+			    "File system revision..........%u\n"),
 	   szText, m_info.dwGroupsCount, m_info.dwFirstBlock, 
 	   (m_info.dwFeatureCompat & EXT3_FEATURE_COMPAT_HAS_JOURNAL) ? i18n("yes") : i18n("no"),
 	   (m_info.dwFeatureRoCompat & EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER) ? i18n("yes") : i18n("no"),
diff -r 0ffb61b8c31d -r 88ac9824fc14 src/client/fs/fs_fat.cpp
--- a/src/client/fs/fs_fat.cpp	Tue Sep 04 21:36:14 2007 +0200
+++ b/src/client/fs/fs_fat.cpp	Tue Sep 04 21:43:30 2007 +0200
@@ -124,14 +124,14 @@ void CFatPart::printfInformations()
 			    "Sector Size...................%u\n"
 			    "Sectors per cluster...........%u\n"
 			    "Reserved Sectors count........%u\n"
-			    "Root directory sectors........%lu\n"
+			    "Root directory sectors........%u\n"
 			    "FAT tables count..............%u\n"
-			    "Total Sectors Count...........%lu\n"
-			    "Sectors per FAT...............%lu\n"
-			    "Clusters count:...............%lu\n"
-			    "Used clusters.................%lu\n"
-			    "Free clusters.................%lu\n"
-			    "Damaged clusters..............%lu\n"),
+			    "Total Sectors Count...........%u\n"
+			    "Sectors per FAT...............%u\n"
+			    "Clusters count:...............%u\n"
+			    "Used clusters.................%u\n"
+			    "Free clusters.................%u\n"
+			    "Damaged clusters..............%u\n"),
 	   szText, m_info.wBytesPerSector, m_info.cSectorsPerCluster,
 	   m_info.wReservedSectorsCount, m_info.dwRootDirSectors,
 	   m_info.cNumberOfFATs,m_info.dwTotalSectorsCount,
diff -r 0ffb61b8c31d -r 88ac9824fc14 src/client/fs/fs_hfs.cpp
--- a/src/client/fs/fs_hfs.cpp	Tue Sep 04 21:36:14 2007 +0200
+++ b/src/client/fs/fs_hfs.cpp	Tue Sep 04 21:43:30 2007 +0200
@@ -22,6 +22,8 @@
 #include "gui_text.h"
 
 #include <stdio.h>
+#define __STDC_FORMAT_MACROS
+#include <inttypes.h>
 
 // =======================================================
 CHfsPart::CHfsPart(char *szDevice, FILE *fDeviceFile, QWORD qwPartSize): CFSBase(szDevice, fDeviceFile, qwPartSize)
@@ -140,10 +142,10 @@ void CHfsPart::printfInformations()
   getStdInfos(szText, sizeof(szText), true);
   
   SNPRINTF(szFullText, i18n("%s" // standard infos
-			    "Allocation Group count:.......%llu\n"
-			    "Blocks per Allocation Group...%lu\n"
+			    "Allocation Group count:.......%"PRIu64"\n"
+			    "Blocks per Allocation Group...%u\n"
 			    "Allocation Group size:........%s\n"
-			    "First allocation block:.......%llu\n"),
+			    "First allocation block:.......%"PRIu64"\n"),
 	   szText, m_info.qwAllocCount, m_info.dwBlocksPerAlloc,
 	   formatSize(m_info.dwAllocSize,szTemp1), m_info.qwFirstAllocBlock);
     
diff -r 0ffb61b8c31d -r 88ac9824fc14 src/client/fs/fs_ntfs.cpp
--- a/src/client/fs/fs_ntfs.cpp	Tue Sep 04 21:36:14 2007 +0200
+++ b/src/client/fs/fs_ntfs.cpp	Tue Sep 04 21:43:30 2007 +0200
@@ -18,6 +18,9 @@
 #include "partimage.h"
 #include "imagefile.h"
 #include "fs_ntfs.h"
+
+#define __STDC_FORMAT_MACROS
+#include <inttypes.h>
 
 // =======================================================
 CNtfsPart::CNtfsPart(char *szDevice, FILE *fDeviceFile, QWORD qwPartSize): CFSBase(szDevice, fDeviceFile, qwPartSize)
@@ -308,8 +311,8 @@ void CNtfsPart::printfInformations()
   SNPRINTF(szFullText, i18n("%s" // standard infos
 			    "Bytes per sector..............%u\n"
 			    "Sectors per cluster...........%u\n"
-			    "File record size..............%lu\n"
-			    "LCN of MFT Data attrib........%llu\n"),
+			    "File record size..............%u\n"
+			    "LCN of MFT Data attrib........%"PRIu64"\n"),
 	   szText, m_info.nBytesPerSector, m_info.cSectorsPerCluster, 
 	   m_info.dwFileRecordSize, m_info.qwLCNOfMftDataAttrib);
     
@@ -726,7 +729,7 @@ void CNtfsRunList::show()
   QWORD i;
   
   for (i=0L; i < m_qwClustersCount; i++)
-    fprintf(stderr, "cluster[%llu] = %llu\n", i, m_qwOffset[i]);
+    fprintf(stderr, "cluster[%llu] = %"PRIu64"\n", i, m_qwOffset[i]);
   
 }
 
diff -r 0ffb61b8c31d -r 88ac9824fc14 src/client/fs/fs_ufs.cpp
--- a/src/client/fs/fs_ufs.cpp	Tue Sep 04 21:36:14 2007 +0200
+++ b/src/client/fs/fs_ufs.cpp	Tue Sep 04 21:43:30 2007 +0200
@@ -25,6 +25,9 @@
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
+
+#define __STDC_FORMAT_MACROS
+#include <inttypes.h>
 
 #include "fs_ufs.h"
 #include "partimage.h"
@@ -210,11 +213,11 @@ void CUfsPart::printfInformations()
   getStdInfos(szText, sizeof(szText), true);
   
   SNPRINTF(szFullText, i18n("%s" // standard infos
-			    "Cylinder groups count:........%lu\n"
+			    "Cylinder groups count:........%u\n"
 			    "Cylinder group size:..........%s\n"
-			    "Basic blocks per CG:..........%lu\n"
-			    "Basic block size:.............%lu\n"
-			    "Data frags count:.............%llu\n"),
+			    "Basic blocks per CG:..........%u\n"
+			    "Basic block size:.............%u\n"
+			    "Data frags count:.............%"PRIu64"\n"),
 	   szText, m_info.dwCylinderGroupsCount, 
 	   formatSize(m_info.dwCylinderGroupSize*m_info.dwBasicBlockSize,szTemp1),
 	   m_info.dwCylinderGroupSize, m_info.dwBasicBlockSize, m_info.qwDataFrags);
diff -r 0ffb61b8c31d -r 88ac9824fc14 src/client/fs/fs_xfs.cpp
--- a/src/client/fs/fs_xfs.cpp	Tue Sep 04 21:36:14 2007 +0200
+++ b/src/client/fs/fs_xfs.cpp	Tue Sep 04 21:43:30 2007 +0200
@@ -208,8 +208,8 @@ void CXfsPart::printfInformations()
   getStdInfos(szText, sizeof(szText), true);
   
   SNPRINTF(szFullText, i18n("%s" // standard infos
-			    "Allocation Group count:.......%lu\n"
-			    "Blocks per Allocation Group...%lu\n"
+			    "Allocation Group count:.......%u\n"
+			    "Blocks per Allocation Group...%u\n"
 			    "Allocation Group size:........%s\n"),
 	   szText, m_info.dwAgCount, m_info.dwAgBlocksCount,
 	   formatSize(m_info.dwAgBlocksCount*m_header.qwBlockSize,szTemp1));
@@ -300,7 +300,7 @@ char* blocknum(char *szBuffer, DWORD dwB
 char* blocknum(char *szBuffer, DWORD dwBn)
 {
   if (dwBn != NULLAGBLOCK)
-    sprintf(szBuffer, "%lu", dwBn);
+    sprintf(szBuffer, "%u", dwBn);
   else
     sprintf(szBuffer, "NULLAGBLOCK");
   return szBuffer;
diff -r 0ffb61b8c31d -r 88ac9824fc14 src/client/gui_text.cpp
--- a/src/client/gui_text.cpp	Tue Sep 04 21:36:14 2007 +0200
+++ b/src/client/gui_text.cpp	Tue Sep 04 21:43:30 2007 +0200
@@ -29,6 +29,8 @@
 #include <stdlib.h>
 #include <errno.h>
 
+#define __STDC_FORMAT_MACROS
+#include <inttypes.h>
 // =======================================================
 void CRestoreMbrWindow::addHardDisk(char *szText, DWORD dwNumber)
 {
@@ -81,12 +83,12 @@ int CRestoreMbrWindow::create()
 }
 
 // =======================================================
-void CRestoreMbrWindow::getValues(DWORD *dwCurrentMbrNb, DWORD *dwOriginalMbrNb, int *nRestoreMode)
-{
-  BEGIN;
-
-  *dwCurrentMbrNb = (DWORD) newtListboxGetCurrent(m_list1);
-  *dwOriginalMbrNb = (DWORD) newtListboxGetCurrent(m_list2);
+void CRestoreMbrWindow::getValues(uintptr_t *dwCurrentMbrNb, uintptr_t *dwOriginalMbrNb, int *nRestoreMode)
+{
+  BEGIN;
+
+  *dwCurrentMbrNb = (uintptr_t) newtListboxGetCurrent(m_list1);
+  *dwOriginalMbrNb = (uintptr_t) newtListboxGetCurrent(m_list2);
 
   if (newtRadioGetCurrent(m_radioFull) == m_radioFull)
     *nRestoreMode = MBR_RESTORE_WHOLE;
@@ -339,7 +341,7 @@ int CSaveOptWindow::create(char *szImage
   m_labelSplit = newtLabel(1, 12, i18n("Image split mode"));
   m_radioSplitAuto = newtRadiobutton(1, 13, i18n("Automatic split (when no space left)"), !options.qwSplitSize, NULL);
   m_radioSplitSize = newtRadiobutton(1, 14, i18n("Into files whose size is:............"), !!options.qwSplitSize, m_radioSplitAuto);
-  SNPRINTF(szTemp, "%llu", (!!options.qwSplitSize) ? (options.qwSplitSize/1024/1024) : 2048);
+  SNPRINTF(szTemp, "%"PRIu64"", (!!options.qwSplitSize) ? (options.qwSplitSize/1024/1024) : 2048);
   m_editSplitSize = newtEntry(43, 14, szTemp, 8, NULL, 0);
   m_labelSplitSizeKB = newtLabel(52, 14, i18n("MiB"));
   m_checkSplitWait = newtCheckbox(1, 15, i18n("Wait after each volume change"), (!!options.bSplitWait ? 'X' : ' '), " X", NULL);
@@ -460,7 +462,7 @@ int CSavingWindow::create(const char *sz
   SNPRINTF(szTemp, i18n("Partition to save:...........%s"), szDevice);
   m_labelPartition = newtLabel(1, 0, szTemp);
   
-  SNPRINTF(szTemp, i18n("Size of the Partition:.......%s = %llu bytes"), formatSize(qwPartSize, szTemp2), qwPartSize);
+  SNPRINTF(szTemp, i18n("Size of the Partition:.......%s = %"PRIu64" bytes"), formatSize(qwPartSize, szTemp2), qwPartSize);
   m_labelPartitionSize = newtLabel(1, 1, szTemp);
   
   SNPRINTF(szTemp, i18n("Image file to create.........%s"), szImageFile);
@@ -608,7 +610,7 @@ void CSavingWindow::showImageFileInfo(ch
       newtLabelSetText(m_labelImageFileSize, szTemp);
     }
   
-  SNPRINTF (szTemp, i18n("Available space for image:...%s = %llu bytes"), formatSize(qwFreeSpace, szTemp2), qwFreeSpace);
+  SNPRINTF (szTemp, i18n("Available space for image:...%s = %"PRIu64" bytes"), formatSize(qwFreeSpace, szTemp2), qwFreeSpace);
   newtLabelSetText(m_labelFreeSpace, szTemp);
 
   //option -B gui=no
@@ -696,8 +698,27 @@ int CRestoreOptWindow::getValues(COption
   RETURN_int(0);
 }
 
-// =======================================================
-int CRestoringWindow::create(char *szDevice, char *szImageFile, QWORD qwCurPartSize, DWORD dwCompressionMode, char *szOriginalDevice, char *szFileSystem, tm dateCreate, QWORD qwOrigPartSize, COptions * options)
+static char *asctime_portable (const struct portable_tm *__tp)
+{
+struct tm tms;
+
+	tms.tm_sec=__tp->tm_sec;
+	tms.tm_min=__tp->tm_min;
+	tms.tm_hour=__tp->tm_hour;
+	tms.tm_mday=__tp->tm_mday;
+	tms.tm_mon=__tp->tm_mon;
+	tms.tm_year=__tp->tm_year;
+	tms.tm_wday=__tp->tm_wday;
+	tms.tm_yday=__tp->tm_yday;
+	tms.tm_isdst=__tp->tm_isdst;
+	tms.tm_gmtoff=__tp->tm_gmtoff;
+	tms.tm_zone="UTC";
+
+	return asctime (&tms);
+}
+
+// =======================================================
+int CRestoringWindow::create(char *szDevice, char *szImageFile, QWORD qwCurPartSize, DWORD dwCompressionMode, char *szOriginalDevice, char *szFileSystem, struct portable_tm dateCreate, QWORD qwOrigPartSize, COptions * options)
 {
   BEGIN;
   
@@ -713,7 +734,7 @@ int CRestoringWindow::create(char *szDev
   SNPRINTF(szTemp, i18n("Partition to restore:.............%s"), szDevice);
   m_labelPartition = newtLabel(1, 0, szTemp);
   
-  SNPRINTF(szTemp, i18n("Size of partition to restore:.....%s = %llu bytes"), formatSize(qwCurPartSize, szTemp2), qwCurPartSize);
+  SNPRINTF(szTemp, i18n("Size of partition to restore:.....%s = %"PRIu64" bytes"), formatSize(qwCurPartSize, szTemp2), qwCurPartSize);
   m_labelPartitionSize = newtLabel(1, 1, szTemp);
   
   SNPRINTF(szTemp, i18n("Image file to use.................%s"), szImageFile);
@@ -727,10 +748,10 @@ int CRestoringWindow::create(char *szDev
   SNPRINTF(szTemp, i18n("Partition was on device:..........%s\n"), szOriginalDevice);
   m_labelOldDevice = newtLabel(1, 5, szTemp);
 
-  SNPRINTF(szTemp, i18n("Image created on:.................%s\n"), asctime(&dateCreate));
+  SNPRINTF(szTemp, i18n("Image created on:.................%s\n"), asctime_portable(&dateCreate));
   m_labelDate = newtLabel(1, 6, szTemp);
 
-  SNPRINTF(szTemp, i18n("Size of the original partition:...%s = %llu bytes"), formatSize(qwOrigPartSize, szTemp2), qwOrigPartSize);
+  SNPRINTF(szTemp, i18n("Size of the original partition:...%s = %"PRIu64" bytes"), formatSize(qwOrigPartSize, szTemp2), qwOrigPartSize);
   m_labelOriginalPartitionSize = newtLabel(1, 7, szTemp);
 
   // stats
diff -r 0ffb61b8c31d -r 88ac9824fc14 src/client/gui_text.h
--- a/src/client/gui_text.h	Tue Sep 04 21:36:14 2007 +0200
+++ b/src/client/gui_text.h	Tue Sep 04 21:43:30 2007 +0200
@@ -56,7 +56,7 @@ class CRestoreMbrWindow: public COptions
   void addMbr(char *szText, DWORD dwNumber);
   //int runForm();
   //void destroyForm();
-  void getValues(DWORD *dwCurrentMbrNb, DWORD *dwOriginalMbrNb, int *nRestoreMode);
+  void getValues(uintptr_t *dwCurrentMbrNb, uintptr_t *dwOriginalMbrNb, int *nRestoreMode);
 	
  private:
   //newtComponent m_formMain;
@@ -124,7 +124,7 @@ class CRestoringWindow
 class CRestoringWindow
 {
  public:
-  int create(char *szDevice, char *szImageFile, QWORD qwCurPartSize, DWORD dwCompressionMode, char *szOriginalDevice, char *szFileSystem, tm dateCreate, QWORD qwOrigPartSize, COptions * options);
+  int create(char *szDevice, char *szImageFile, QWORD qwCurPartSize, DWORD dwCompressionMode, char *szOriginalDevice, char *szFileSystem, struct portable_tm dateCreate, QWORD qwOrigPartSize, COptions * options);
   int runForm();
   void destroyForm();
   void showImageFileInfo(char *szImageFile, int nCompressionMode, char *szFullyBatchMode);
diff -r 0ffb61b8c31d -r 88ac9824fc14 src/client/imagefile.cpp
--- a/src/client/imagefile.cpp	Tue Sep 04 21:36:14 2007 +0200
+++ b/src/client/imagefile.cpp	Tue Sep 04 21:43:30 2007 +0200
@@ -488,7 +488,7 @@ void CImage::splitChangeImageFileWrite()
     }
 
   set_dwVolumeNumber(get_dwVolumeNumber()+1); // increase the volume number
-  SNPRINTF(aux, "%s/%s.%.3ld", get_szPath(), get_szOriginalFilename(), get_dwVolumeNumber());
+  SNPRINTF(aux, "%s/%s.%.3d", get_szPath(), get_szOriginalFilename(), get_dwVolumeNumber());
   //*(aux+MAXPATHLEN-1) = '\0';
   
   set_szImageFilename(aux);
@@ -514,7 +514,7 @@ void CImage::splitChangeImageFileRead()
 
   // increase volume number
   set_dwVolumeNumber(get_dwVolumeNumber()+1);
-  SNPRINTF(aux, "%s/%s.%.3ld", get_szPath(), get_szOriginalFilename(), get_dwVolumeNumber());
+  SNPRINTF(aux, "%s/%s.%.3d", get_szPath(), get_szOriginalFilename(), get_dwVolumeNumber());
   //*(aux+MAXPATHLEN-1) = '\0';
   set_szImageFilename(aux);
 
@@ -700,7 +700,7 @@ int CImage::openWritingFdDisk()
 	      set_szPath(aux2);
 	      extractFilenameFromFullPath(szAux, aux2); // filename without path
 	      set_szOriginalFilename(aux2);
-	      SNPRINTF(szAux, "%s/%s.%.3ld", get_szPath(), get_szOriginalFilename(), get_dwVolumeNumber());
+	      SNPRINTF(szAux, "%s/%s.%.3d", get_szPath(), get_szOriginalFilename(), get_dwVolumeNumber());
 	      set_szImageFilename(szAux);
 	      nRes = openWritingFdDisk();
 	      RETURN_int(nRes);
@@ -728,7 +728,7 @@ int CImage::openWritingFdDisk()
             case ERR_RETRY:
               strcpy(szAux, excep->getNewString()); // endding '/' were removed 
               set_szPath(szAux); 
-	      SNPRINTF(aux2, "%s/%s.%.3ld", szAux, get_szOriginalFilename(),
+	      SNPRINTF(aux2, "%s/%s.%.3d", szAux, get_szOriginalFilename(),
 		       get_dwVolumeNumber());
               set_szImageFilename(aux2);
 	      
@@ -1068,7 +1068,7 @@ void CImage::openReading(CVolumeHeader *
             set_szPath(aux2);
             extractFilenameFromFullPath(szAux, aux2);
             set_szOriginalFilename(aux2);
-            SNPRINTF(szAux, "%s/%s.%.3ld", get_szPath(), 
+            SNPRINTF(szAux, "%s/%s.%.3d", get_szPath(), 
                get_szOriginalFilename(), get_dwVolumeNumber());
             set_szImageFilename(szAux);
             umountImageLocation();
@@ -1132,7 +1132,7 @@ void CImage::openReading(CVolumeHeader *
 	
   if (strcmp(headVolume.szMagicString, MAGIC_BEGIN_VOLUME) != 0)
     {	
-      SNPRINTF(szAux, "%s/%s.%.3ld", get_szPath(), get_szOriginalFilename(), get_dwVolumeNumber());
+      SNPRINTF(szAux, "%s/%s.%.3d", get_szPath(), get_szOriginalFilename(), get_dwVolumeNumber());
       THROW(ERR_NOTAPARTIMAGEFILE, szAux);
     }
 
diff -r 0ffb61b8c31d -r 88ac9824fc14 src/client/imginfo.cpp
--- a/src/client/imginfo.cpp	Tue Sep 04 21:36:14 2007 +0200
+++ b/src/client/imginfo.cpp	Tue Sep 04 21:43:30 2007 +0200
@@ -26,6 +26,29 @@
 #include "imagefile.h"
 #include "interface_newt.h"
 
+#define __STDC_FORMAT_MACROS
+#include <inttypes.h>
+
+static char *asctime_portable (const struct portable_tm *__tp)
+{
+struct tm tms;
+
+	tms.tm_sec=__tp->tm_sec;
+	tms.tm_min=__tp->tm_min;
+	tms.tm_hour=__tp->tm_hour;
+	tms.tm_mday=__tp->tm_mday;
+	tms.tm_mon=__tp->tm_mon;
+	tms.tm_year=__tp->tm_year;
+	tms.tm_wday=__tp->tm_wday;
+	tms.tm_yday=__tp->tm_yday;
+	tms.tm_isdst=__tp->tm_isdst;
+	tms.tm_gmtoff=__tp->tm_gmtoff;
+	tms.tm_zone="UTC";
+
+	return asctime (&tms);
+}
+
+
 // =======================================================
 void imageInfoShowRegular(char *szText, int nMaxTextLen, CMainHeader *head, char *szImagefile, DWORD dwCompression)
 {
@@ -65,20 +88,20 @@ void imageInfoShowRegular(char *szText, 
 				     "Description:...........%s\n"
 				     "Original device:.......%s\n"
 				     "Original filepath:.... %s\n"
-				     "Flags:.................%ld: %s\n"
+				     "Flags:.................%d: %s\n"
 				     "Creation date:.........%s"
 				     "Partition size:........%s\n"
 				     "Hostname:..............%s\n"
 				     "Compatible Version:....%s\n"
-				     "Encryption algorithm:..%ld -> %s\n"
-				     "MBR saved count:.......%lu\n\n"
+				     "Encryption algorithm:..%d -> %s\n"
+				     "MBR saved count:.......%u\n\n"
 				     "System of the backup:\n"
 				     "- machine:.............%s\n"
 				     "- operating system:....%s\n"
 				     "- release:.............%s\n"
 				     "\n\n"), 
 	   head->szFileSystem, szDescription, head->szOriginalDevice, head->szFirstImageFilepath, 
-	   head->dwMainFlags, szFlags, asctime(&head->dateCreate), formatSize(head->qwPartSize, cTemp), head->szHostname,
+	   head->dwMainFlags, szFlags, asctime_portable(&head->dateCreate), formatSize(head->qwPartSize, cTemp), head->szHostname,
 	   head->szVersion, head->dwEncryptAlgo, szEncryption, head->dwMbrCount, head->szUnameMachine,
 	   head->szUnameSysname, head->szUnameRelease);
 }
@@ -88,7 +111,7 @@ void imageInfoShowMBR(char *szText, int 
 {
   snprintf(szText, nMaxTextLen, i18n("-------------------- MBR %.3d -------------------\n"
 				     "Device:................%s\n"
-				     "Device blocks count:...%llu\n"
+				     "Device blocks count:...%"PRIu64"\n"
 				     "Device model:..........%s\n\n"),
 	   i, mbr->szDevice, mbr->qwBlocksCount, mbr->szDescModel);
 }
@@ -127,10 +150,10 @@ void imageInfoShowVolume(char *szText, i
       break;
     }
   
-  snprintf(szText, nMaxTextLen, i18n("Volume number:.........%lu\n"
+  snprintf(szText, nMaxTextLen, i18n("Volume number:.........%u\n"
 				     "Volume size:...........%s\n"
-				     "Compression level: ....%ld -> %s\n"
-				     "Identificator:.........%llu=%llX\n\n"),
+				     "Compression level: ....%d -> %s\n"
+				     "Identificator:.........%"PRIu64"=%"PRIX64"\n\n"),
 	   head->dwVolumeNumber, formatSize(qwImageSize, cTemp), dwCompression, 
 	   szCompression, head->qwIdentificator, head->qwIdentificator);
 }
diff -r 0ffb61b8c31d -r 88ac9824fc14 src/client/interface_newt.cpp
--- a/src/client/interface_newt.cpp	Tue Sep 04 21:36:14 2007 +0200
+++ b/src/client/interface_newt.cpp	Tue Sep 04 21:43:30 2007 +0200
@@ -239,7 +239,7 @@ int CInterfaceNewt::guiInitMainWindow(ch
   labelNetwork = newtLabel(5, 18, i18n("IP/name of the server:"));
   editNetwork = newtEntry(28, 18, szNetworkIP, 25, NULL, 0);
   labelPort = newtLabel(54, 18, i18n("Port:"));
-  SNPRINTF(szTemp, "%lu", *dwServerPort);
+  SNPRINTF(szTemp, "%u", *dwServerPort);
   editPort = newtEntry(60, 18, szTemp, 6, NULL, 0);
   
   btnContinue = newtCompactButton(50, 12, i18n("Next (F5)"));
@@ -473,7 +473,7 @@ WORD CInterfaceNewt::askNewPath(char * s
   char szMess[2048];
  
   SNPRINTF(szMess, i18n("Disk full! Can't write next volume file "
-     "(%s.%.3ld)\nto %s\nPlease, enter another directory path "
+     "(%s.%.3d)\nto %s\nPlease, enter another directory path "
      "(without filename):"), szOrigFilename, dwVolume, szPath);
   //*(szMess+2047) = '\0';
 
diff -r 0ffb61b8c31d -r 88ac9824fc14 src/client/main.cpp
--- a/src/client/main.cpp	Tue Sep 04 21:36:14 2007 +0200
+++ b/src/client/main.cpp	Tue Sep 04 21:43:30 2007 +0200
@@ -29,6 +29,10 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
+
+#define __STDC_FORMAT_MACROS
+#include <inttypes.h>
+
 #include <sched.h>
 #include <sys/types.h>
 #include <sys/param.h>
@@ -278,7 +282,7 @@ int main(int argc, char *argv[])
 	  case 'V': // split image into multiple files
 	  
 	    options.qwSplitSize = (QWORD)atol(optarg) * 1024 * 1024;
-	    fprintf (stderr, i18n("Volume size: %llu bytes (%ld MiB)\n"),
+	    fprintf (stderr, i18n("Volume size: %"PRIu64" bytes (%ld MiB)\n"),
 		     options.qwSplitSize, atol(optarg));
 	    break;
 	  
@@ -971,15 +975,15 @@ int checkStructSizes()
 {
    // ---- check types sizes
 
-   if (sizeof(unsigned long int) != 4)
+   if (sizeof(DWORD) != 4)
    {
-      fprintf (stderr, "Error: sizeof(DWORD) != 4 (%d)\n", sizeof(unsigned long int));
-      goto errcheck;
-   }
-
-   if (sizeof(unsigned long long int) != 8)
+      fprintf (stderr, "Error: sizeof(DWORD) != 4 (%zd)\n", sizeof(DWORD));
+      goto errcheck;
+   }
+
+   if (sizeof(QWORD) != 8)
    {
-      fprintf (stderr, "Error: sizeof(QWORD) != 8 (%d)\n", sizeof(unsigned long long int));
+      fprintf (stderr, "Error: sizeof(QWORD) != 8 (%zd)\n", sizeof(QWORD));
       goto errcheck;
    }
 
@@ -988,7 +992,7 @@ int checkStructSizes()
    // check main header size is 16384
    if (sizeof(CMainHeader) != 16384)
    {
-      fprintf (stderr, "Error: main header size != 16384 (%d)\n",
+      fprintf (stderr, "Error: main header size != 16384 (%zd)\n",
 	       sizeof(CMainHeader));
       goto errcheck;
    }
@@ -996,7 +1000,7 @@ int checkStructSizes()
    // check ext2 header size is 16384
    if (sizeof(CInfoExt2Header) != INFOS_STRUCT_SIZE)
    {	
-      fprintf (stderr, "Error: ext2 header size != %d (%d)\n", INFOS_STRUCT_SIZE,
+      fprintf (stderr, "Error: ext2 header size != %d (%zd)\n", INFOS_STRUCT_SIZE,
 	       sizeof(CInfoExt2Header));
       goto errcheck;
    }
@@ -1004,7 +1008,7 @@ int checkStructSizes()
    // check reiserfs header size is 16384
    if (sizeof(CInfoReiserHeader) != INFOS_STRUCT_SIZE)
    {	
-      fprintf (stderr, "Error: reiserfs header size != %d (%d)\n", INFOS_STRUCT_SIZE,
+      fprintf (stderr, "Error: reiserfs header size != %d (%zd)\n", INFOS_STRUCT_SIZE,
 	       sizeof(CInfoReiserHeader));
       goto errcheck;
    }
@@ -1012,7 +1016,7 @@ int checkStructSizes()
    // check fat header size is 16384
    if (sizeof(CInfoFatHeader) != INFOS_STRUCT_SIZE)
    {	
-      fprintf (stderr, "Error: fat header size != %d (%d)\n", INFOS_STRUCT_SIZE,
+      fprintf (stderr, "Error: fat header size != %d (%zd)\n", INFOS_STRUCT_SIZE,
 	       sizeof(CInfoFatHeader));
       goto errcheck;
    }
@@ -1020,7 +1024,7 @@ int checkStructSizes()
    // check ntfs header size is 16384
    if (sizeof(CInfoNtfsHeader) != INFOS_STRUCT_SIZE)
    {	
-      fprintf (stderr, "Error: ntfs header size != %d (%d)\n", INFOS_STRUCT_SIZE,
+      fprintf (stderr, "Error: ntfs header size != %d (%zd)\n", INFOS_STRUCT_SIZE,
 	       sizeof(CInfoNtfsHeader));
       goto errcheck;
    }
@@ -1028,7 +1032,7 @@ int checkStructSizes()
    // check hpfs header size is 16384
    if (sizeof(CInfoHpfsHeader) != INFOS_STRUCT_SIZE)
    {	
-      fprintf (stderr, "Error: hpfs header size != %d (%d)\n", INFOS_STRUCT_SIZE,
+      fprintf (stderr, "Error: hpfs header size != %d (%zd)\n", INFOS_STRUCT_SIZE,
 	       sizeof(CInfoHpfsHeader));
       goto errcheck;
    }
@@ -1036,7 +1040,7 @@ int checkStructSizes()
    // check jfs header size is 16384
    if (sizeof(CInfoJfsHeader) != INFOS_STRUCT_SIZE)
    {	
-      fprintf (stderr, "Error: jfs header size != %d (%d)\n", INFOS_STRUCT_SIZE,
+      fprintf (stderr, "Error: jfs header size != %d (%zd)\n", INFOS_STRUCT_SIZE,
 	       sizeof(CInfoJfsHeader));
       goto errcheck;
    }
@@ -1044,7 +1048,7 @@ int checkStructSizes()
    // check xfs header size is 16384
    if (sizeof(CInfoXfsHeader) != INFOS_STRUCT_SIZE)
    {	
-      fprintf (stderr, "Error: xfs header size != %d (%d)\n", INFOS_STRUCT_SIZE,
+      fprintf (stderr, "Error: xfs header size != %d (%zd)\n", INFOS_STRUCT_SIZE,
 	       sizeof(CInfoXfsHeader));
       goto errcheck;
    }
@@ -1052,7 +1056,7 @@ int checkStructSizes()
    // check hfs header size is 16384
    if (sizeof(CInfoHfsHeader) != INFOS_STRUCT_SIZE)
    {	
-      fprintf (stderr, "Error: hfs header size != %d (%d)\n", INFOS_STRUCT_SIZE,
+      fprintf (stderr, "Error: hfs header size != %d (%zd)\n", INFOS_STRUCT_SIZE,
 	       sizeof(CInfoHfsHeader));
       goto errcheck;
    }
@@ -1060,36 +1064,39 @@ int checkStructSizes()
    // check ufs header size is 16384
    if (sizeof(CInfoUfsHeader) != INFOS_STRUCT_SIZE)
    {	
-      fprintf (stderr, "Error: jfs header size != %d (%d)\n", INFOS_STRUCT_SIZE,
-	       sizeof(CInfoUfsHeader));
+      fprintf (stderr, "Error: jfs header size != %d (%zd)\n",
+     	 INFOS_STRUCT_SIZE, sizeof(CInfoUfsHeader));
       goto errcheck;
    }
  
    // check tail size is 16384
    if (sizeof(CMainTail) != 16384)
    {	
-      fprintf (stderr, "Error: main footer size != 16384 (%d)\n", sizeof(CMainTail));
+      fprintf (stderr, "Error: main footer size != 16384 (%zd)\n",
+		sizeof(CMainTail));
       goto errcheck;
    }
   
    // check volume header size is 512
    if (sizeof(CVolumeHeader) != 512)
    {	
-      fprintf (stderr, "Error: volume hedaer size != 512 (%d)\n", sizeof(CVolumeHeader));
+      fprintf (stderr, "Error: volume hedaer size != 512 (%zd)\n",
+     	 sizeof(CVolumeHeader));
       goto errcheck;
    }
  
    // check MBR size is 2048
    if (sizeof(CMbr) != 2048)
    {	
-      fprintf (stderr, "Error: MBR size != 2048 (%d)\n", sizeof(CMbr));
+      fprintf (stderr, "Error: MBR size != 2048 (%zd)\n", sizeof(CMbr));
       goto errcheck;
    }
  
    // check volume header size is 512
    if (sizeof(CLocalHeader) != 16384)
    {	
-      fprintf (stderr, "Error: local header size != 16384 (%d)\n", sizeof(CLocalHeader));
+      fprintf (stderr, "Error: local header size != 16384 (%zd)\n",
+     	 sizeof(CLocalHeader));
       goto errcheck;
    }
 
diff -r 0ffb61b8c31d -r 88ac9824fc14 src/client/mbr_backup.cpp
--- a/src/client/mbr_backup.cpp	Tue Sep 04 21:36:14 2007 +0200
+++ b/src/client/mbr_backup.cpp	Tue Sep 04 21:43:30 2007 +0200
@@ -164,7 +164,7 @@ int mbrParseProcPart(char *szHdList, int
 	      //if (isDriveReady(szTemp))
 		{
 		  nCount++; // number of hard disks
-		  SNPRINTF(szTemp, "/dev/%s#%lu#",szDevice, (DWORD)nBlocks);
+		  SNPRINTF(szTemp, "/dev/%s#%u#",szDevice, (DWORD)nBlocks);
 		  if (szHdList)
 		    strncat(szHdList, szTemp, nMaxLen);
 		}
diff -r 0ffb61b8c31d -r 88ac9824fc14 src/client/misc.cpp
--- a/src/client/misc.cpp	Tue Sep 04 21:36:14 2007 +0200
+++ b/src/client/misc.cpp	Tue Sep 04 21:43:30 2007 +0200
@@ -22,6 +22,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
+#define __STDC_FORMAT_MACROS
+#include <inttypes.h>
 
 #ifdef HAVE_SYS_PARAM_H
   #include <sys/param.h>
@@ -88,8 +90,8 @@ void restoreMbr(char *szImageFile, COpti
 
   CRestoreMbrWindow optGui;
   DWORD dwDiskCount;
-  DWORD dwOriginalMbrNb;
-  DWORD dwCurrentMbrNb;
+  uintptr_t dwOriginalMbrNb;
+  uintptr_t dwCurrentMbrNb;
   char szHdList[2048];
   char szTemp[512];
   char szTemp2[512];
@@ -209,7 +211,7 @@ void restoreMbr(char *szImageFile, COpti
 	  image.closeReading(true);
           throw excep;
 	}
-      SNPRINTF(szTemp, "%.3lu: %s [%llu blocks]", i, mbrOriginal[i].szDevice, mbrOriginal[i].qwBlocksCount);
+      SNPRINTF(szTemp, "%.3u: %s [%"PRIu64" blocks]", i, mbrOriginal[i].szDevice, mbrOriginal[i].qwBlocksCount);
       if (options->bBatchMode == false)
 	optGui.addMbr(szTemp, i);
       
@@ -319,6 +321,28 @@ void restoreMbr(char *szImageFile, COpti
     THROW(ERR_ERRNO, errno);
 
   RETURN;
+}
+
+struct portable_tm *localtime_portable (const time_t *__timer)
+{
+static struct portable_tm ret;
+struct tm *host_tm;
+
+	host_tm=localtime (__timer);
+	ret.tm_sec=host_tm->tm_sec;
+	ret.tm_min=host_tm->tm_min;
+	ret.tm_hour=host_tm->tm_hour;
+	ret.tm_mday=host_tm->tm_mday;
+	ret.tm_mon=host_tm->tm_mon;
+	ret.tm_year=host_tm->tm_year;
+	ret.tm_wday=host_tm->tm_wday;
+	ret.tm_yday=host_tm->tm_yday;
+	ret.tm_isdst=host_tm->tm_isdst;
+
+	ret.tm_gmtoff=host_tm->tm_gmtoff;
+	ret.tm_zone=0;
+
+	return &ret;
 }
 
 // =======================================================
@@ -467,7 +491,7 @@ void savePartition(char *szDevice, char 
   time(&dt);
 
   // current time/date (date of image creation)
-  headMain.dateCreate = *localtime(&dt);
+  headMain.dateCreate = *localtime_portable(&dt);
 
   // file format version
   strcpy(headMain.szVersion, CURRENT_IMAGE_FORMAT); 
diff -r 0ffb61b8c31d -r 88ac9824fc14 src/client/partimage.h
--- a/src/client/partimage.h	Tue Sep 04 21:36:14 2007 +0200
+++ b/src/client/partimage.h	Tue Sep 04 21:43:30 2007 +0200
@@ -21,6 +21,7 @@
 #include <errno.h>
 #include <libintl.h> // intl translation
 #include <stdio.h>
+#include <stdint.h>
 #include <time.h>
 
 #ifdef HAVE_CONFIG_H
@@ -53,10 +54,10 @@ extern time_t g_timeEnd;   // End of the
 extern time_t g_timeEnd;   // End of the operation
 
 typedef bool BOOL; // variant size
-typedef unsigned char BYTE; // 8 bits
-typedef unsigned short int WORD; // 16 bits
-typedef unsigned long int DWORD; // 32 bits
-typedef unsigned long long int QWORD; // 64 bits
+typedef uint8_t BYTE; // 8 bits
+typedef uint16_t WORD; // 16 bits
+typedef uint32_t DWORD; // 32 bits
+typedef uint64_t QWORD; // 64 bits
 
 #include "endianess.h"
 
diff -r 0ffb61b8c31d -r 88ac9824fc14 src/shared/common.cpp
--- a/src/shared/common.cpp	Tue Sep 04 21:36:14 2007 +0200
+++ b/src/shared/common.cpp	Tue Sep 04 21:43:30 2007 +0200
@@ -23,6 +23,9 @@
 #include <stdlib.h>
 #include <ctype.h>
 #include <fcntl.h>
+
+#define __STDC_FORMAT_MACROS
+#include <inttypes.h>
 
 #include <sys/types.h>
 #include <sys/ioctl.h>
@@ -268,7 +271,7 @@ char *formatSize2(QWORD qwSize, char *sz
   
   if (qwSize < llKiloB) // In Bytes
     {
-      snprintf(szText, nMaxLen, i18n("%lld bytes"), qwSize);
+      snprintf(szText, nMaxLen, i18n("%"PRId64" bytes"), qwSize);
     }
   else if (qwSize < llMegaB) // In KiloBytes
     {
@@ -307,7 +310,7 @@ char *formatSizeNoGui(QWORD qwSize, char
 
   if (qwSize < llKiloB) // In Bytes
     {
-      snprintf(szText, nMaxLen, i18n("%lldb"), qwSize);
+      snprintf(szText, nMaxLen, i18n("%"PRId64"b"), qwSize);
     }
   else if (qwSize < llMegaB) // In KiloBytes
     {
diff -r 0ffb61b8c31d -r 88ac9824fc14 src/shared/common.h
--- a/src/shared/common.h	Tue Sep 04 21:36:14 2007 +0200
+++ b/src/shared/common.h	Tue Sep 04 21:43:30 2007 +0200
@@ -146,6 +146,23 @@ struct COptions
 
 #define MAX_UNAMEINFOLEN 65 //SYS_NMLN
 
+struct portable_tm
+{
+	uint32_t tm_sec;
+	uint32_t tm_min;
+	uint32_t tm_hour;
+	uint32_t tm_mday;
+	uint32_t tm_mon;
+	uint32_t tm_year;
+	uint32_t tm_wday;
+	uint32_t tm_yday;
+	uint32_t tm_isdst;
+
+	uint32_t tm_gmtoff;
+	uint32_t tm_zone;
+};
+
+
 // ================================================
 struct CMainHeader // size must be 16384 (adjust the reserved data)
 {
@@ -163,7 +180,7 @@ struct CMainHeader // size must be 16384
 
   DWORD dwCompression; // COMPRESS_XXXXXX
   DWORD dwMainFlags;
-  struct tm dateCreate; // date of image creation
+  struct portable_tm dateCreate; // date of image creation
   QWORD qwPartSize; // size of the partition in bytes
   char szHostname[MAX_HOSTNAMESIZE];
   char szVersion[64]; // version of the image file
diff -r 0ffb61b8c31d -r 88ac9824fc14 src/shared/image_disk.cpp
--- a/src/shared/image_disk.cpp	Tue Sep 04 21:36:14 2007 +0200
+++ b/src/shared/image_disk.cpp	Tue Sep 04 21:43:30 2007 +0200
@@ -524,7 +524,7 @@ void CImageDisk::openWriting() // [Main-
   if (m_bIsOpened == true)
     THROW(ERR_OPENED);
   
-  SNPRINTF(szShortName, "pi%.8lx", (DWORD)generateIdentificator());
+  SNPRINTF(szShortName, "pi%.8x", (DWORD)generateIdentificator());
   extractFilepathFromFullPath(m_szImageFilename, szPathDir); // filepath without filename
   if (access(szPathDir, R_OK) == -1) mkdir(szPathDir, 0755);
   snprintf(m_szSpaceFilename, MAXPATHLEN, "%s/%8s.tmp", szPathDir, szShortName);