Skip to content

Commit

Permalink
Unix: fixed compatibility issues
Browse files Browse the repository at this point in the history
git-svn-id: https://freearc.svn.sourceforge.net/svnroot/freearc@582 3a4f7f31-9599-433d-91b1-573e8b61252c
  • Loading branch information
bulatz committed Sep 11, 2009
1 parent 4bec1b6 commit df86a9c
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 8 deletions.
2 changes: 2 additions & 0 deletions ArcvProcessExtract.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ import Foreign.Ptr
import Foreign.Marshal.Utils
import Foreign.Storable

#ifdef FREEARC_CELS
import TABI
#endif
import Utils
import Errors
import Process
Expand Down
2 changes: 2 additions & 0 deletions Compression.hs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ import Foreign.Marshal.Pool
import Foreign.Ptr
import System.IO.Unsafe

#ifdef FREEARC_CELS
import qualified TABI
#endif
import qualified CompressionLib
import Utils
import Errors
Expand Down
2 changes: 1 addition & 1 deletion Compression/Common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ CFILENAME GetTempDir (void)
realloc (TempDir, (_tcslen(TempDir)+1) * sizeof(*TempDir));
#else
TempDir = tempnam(NULL,NULL);
CFILENAME *basename = drop_dirname(TempDir);
CFILENAME basename = drop_dirname(TempDir);
if (basename > TempDir)
basename[-1] = '\0';
#endif
Expand Down
7 changes: 7 additions & 0 deletions Compression/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ static inline void WINAPI UnixTimeToFileTime( time_t time, FILETIME* ft )
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <utime.h>

#define __cdecl
#define SSIZE_T ssize_t
Expand Down Expand Up @@ -775,7 +776,13 @@ struct MYDIR : MYFILE
// Make it a temporary directory, removed automatically by destructor
bool create_tempdir()
{
#ifdef FREEARC_WIN
utf16_to_utf8 (GetTempDir(), utf8name);
#elif defined(FREEARC_UNIX)
strcpy(utf8name, GetTempDir());
#else
???
#endif
SetBaseDir (utf8name);
for (unsigned i = time_based_random(), cnt=0; cnt<1000; cnt++)
{
Expand Down
5 changes: 1 addition & 4 deletions Documentation/History.txt
Original file line number Diff line number Diff line change
Expand Up @@ -353,17 +353,14 @@

��������� �� splash1.tga!
������������ ��� �������� �� ������� crc ������, ������������ ��������� CheckNews.aspx
������� ��� ���������� ������ �� ����� (��� ������������)
fashell
��������� � �������� � unicode-������� � BOM � ������ ������� (�������� ����� luaL_dofile)
openDialog (cmd:"--":params) - ��������� ����� ����� ���� ���������� ����� ("--add-dialog -mx -- filenames")
��� ������ ����. �������� ������������ ��������� ��������� �� ���������� (�� ������� ���� ����� Cancel)
���� ���������� ����� - ������ ��������� �� � gui �����?
����������
������� �������� readme � ������ ����������
?overwrite arc.ini/groups
sfx linux/nodelete
rep: �� ������ ������ �������������� ������� �� ����� :)
?overwrite arc.ini/groups
?����� ����� ���������� �����������
��� ����� �������� ���� ������� ������ �� �������� ���������� ����� (����� ������/����� ������)
-mppmd:1m+ppmd:1m - �����
Expand Down
2 changes: 1 addition & 1 deletion Files.hs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ getExeName = getProgName


-- |Get temporary files directory
getTempDir = c_GetTempDir >>= peekCWString
getTempDir = c_GetTempDir >>= peekCFilePath

foreign import ccall safe "Environment.h GetTempDir"
c_GetTempDir :: IO CFilePath
Expand Down
2 changes: 1 addition & 1 deletion Unarc/ArcCommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#endif

#define HEADER1 "FreeArc 0.52 "
#define HEADER2 " http://freearc.org 2009-09-02\n"
#define HEADER2 " http://freearc.org 2009-09-11\n"


/******************************************************************************
Expand Down
6 changes: 5 additions & 1 deletion Unarc/makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include ../common.mak

windows: unarc.exe unarc.dll arc.sfx freearc.sfx freearc-installer.sfx FreeArc.fmt
linux: unarc arc.linux.sfx
unix: unarc arc.linux.sfx arc-mini.linux.sfx arc-tiny.linux.sfx

Extractor_DEFINES = -DFREEARC_DECOMPRESS_ONLY -D_NO_EXCEPTIONS -DUNARC
OBJDIR = $(TEMPDIR)-unarc
Expand Down Expand Up @@ -67,7 +67,11 @@ unarc: $(OBJDIR)/unarc.o $(LINKOBJ)

arc.linux.sfx: $(OBJDIR)/ArcSFX.o $(LINKOBJ)
$(GCC) $< $(LINKOBJ) $(UNIX_LINK_FLAGS) -o arc.linux.sfx

arc-mini.linux.sfx: $(OBJDIR)/ArcSFX.o $(LINKOBJ)
$(GCC) $< $(LINKOBJ_MINI) $(UNIX_LINK_FLAGS) -o arc-mini.linux.sfx

arc-tiny.linux.sfx: $(OBJDIR)/ArcTinySFX.o $(LINKOBJ)
$(GCC) $< $(LINKOBJ_TINY) $(UNIX_LINK_FLAGS) -o arc-tiny.linux.sfx
# upx -9 --lzma arc*.linux.sfx

Expand Down

0 comments on commit df86a9c

Please sign in to comment.