forked from enlightenment/efl
* src/lib/Evil.h:
add POSIX definitions * src/lib/evil.c: make realpath available with cegcc. The function just copy the file name to the resolved name with that compiler SVN revision: 34097
This commit is contained in:
parent
4da0f5fa80
commit
2d25da624d
|
@ -1,3 +1,13 @@
|
||||||
|
2008-03-23 Vincent Torri <doursse at users dot sf dot net>
|
||||||
|
|
||||||
|
* src/lib/Evil.h:
|
||||||
|
add POSIX definitions
|
||||||
|
|
||||||
|
* src/lib/evil.c:
|
||||||
|
make realpath available with cegcc. The function
|
||||||
|
just copy the file name to the resolved name with
|
||||||
|
that compiler
|
||||||
|
|
||||||
2008-03-13 Vincent Torri <doursse at users dot sf dot net>
|
2008-03-13 Vincent Torri <doursse at users dot sf dot net>
|
||||||
|
|
||||||
* INSTALL:
|
* INSTALL:
|
||||||
|
|
|
@ -282,6 +282,29 @@ EAPI int pipe(int *fds);
|
||||||
#if defined(__MSDOS__) || defined(__EMX__) || \
|
#if defined(__MSDOS__) || defined(__EMX__) || \
|
||||||
(defined(_WIN32) && !defined(_UWIN) && !defined(__CYGWIN__) && !defined(__CEGCC__))
|
(defined(_WIN32) && !defined(_UWIN) && !defined(__CYGWIN__) && !defined(__CEGCC__))
|
||||||
# if defined(_MSC_VER) || defined(__MINGW32__)
|
# if defined(_MSC_VER) || defined(__MINGW32__)
|
||||||
|
|
||||||
|
struct stat
|
||||||
|
{
|
||||||
|
_dev_t st_dev; /* Equivalent to drive number 0=A 1=B ... */
|
||||||
|
_ino_t st_ino; /* Always zero ? */
|
||||||
|
_mode_t st_mode; /* See above constants */
|
||||||
|
short st_nlink; /* Number of links. */
|
||||||
|
short st_uid; /* User: Maybe significant on NT ? */
|
||||||
|
short st_gid; /* Group: Ditto */
|
||||||
|
_dev_t st_rdev; /* Seems useless (not even filled in) */
|
||||||
|
_off_t st_size; /* File size in bytes */
|
||||||
|
time_t st_atime; /* Accessed date (always 00:00 hrs local
|
||||||
|
* on FAT) */
|
||||||
|
time_t st_mtime; /* Modified time */
|
||||||
|
time_t st_ctime; /* Creation time */
|
||||||
|
};
|
||||||
|
|
||||||
|
# define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR)
|
||||||
|
# define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG)
|
||||||
|
|
||||||
|
# define S_IRUSR _S_IRUSR
|
||||||
|
# define S_IWUSR _S_IWUSR
|
||||||
|
# define S_IXUSR _S_IXUSR
|
||||||
# define S_IRGRP S_IRUSR
|
# define S_IRGRP S_IRUSR
|
||||||
# define S_IROTH S_IRUSR
|
# define S_IROTH S_IRUSR
|
||||||
# define S_IWGRP S_IWUSR
|
# define S_IWGRP S_IWUSR
|
||||||
|
@ -294,11 +317,10 @@ EAPI int pipe(int *fds);
|
||||||
# define write(fd,buffer,count) _write((fd),(buffer),(count))
|
# define write(fd,buffer,count) _write((fd),(buffer),(count))
|
||||||
# define unlink(filename) _unlink((filename))
|
# define unlink(filename) _unlink((filename))
|
||||||
# define mkdir(p,m) _mkdir(p)
|
# define mkdir(p,m) _mkdir(p)
|
||||||
|
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if ! ( defined(__CEGCC__) || defined(__MINGW32CE__) )
|
|
||||||
/**
|
/**
|
||||||
* @brief Return an absolute or full path name for a specified relative path name.
|
* @brief Return an absolute or full path name for a specified relative path name.
|
||||||
*
|
*
|
||||||
|
@ -325,9 +347,6 @@ EAPI int pipe(int *fds);
|
||||||
*/
|
*/
|
||||||
EAPI char *realpath(const char *file_name, char *resolved_name);
|
EAPI char *realpath(const char *file_name, char *resolved_name);
|
||||||
|
|
||||||
#endif /* ! __CEGCC__ && ! __MINGW32CE__ */
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Initiates the use of Windows sockets.
|
* @brief Initiates the use of Windows sockets.
|
||||||
*
|
*
|
||||||
|
|
|
@ -151,6 +151,7 @@ symlink(const char *oldpath, const char *newpath)
|
||||||
if (FAILED(pISL->lpVtbl->QueryInterface(pISL, &IID_IPersistFile, (void **)persit_file)))
|
if (FAILED(pISL->lpVtbl->QueryInterface(pISL, &IID_IPersistFile, (void **)persit_file)))
|
||||||
goto no_queryinterface;
|
goto no_queryinterface;
|
||||||
|
|
||||||
|
/* FIXME: is it for cegcc ??? */
|
||||||
mbstowcs(new_path, newpath, MB_CUR_MAX);
|
mbstowcs(new_path, newpath, MB_CUR_MAX);
|
||||||
if (FAILED(pIPF->lpVtbl->Save(pIPF, new_path, FALSE)))
|
if (FAILED(pIPF->lpVtbl->Save(pIPF, new_path, FALSE)))
|
||||||
goto no_save;
|
goto no_save;
|
||||||
|
@ -345,13 +346,23 @@ pipe(int *fds)
|
||||||
|
|
||||||
#endif /* ! __CEGCC__ */
|
#endif /* ! __CEGCC__ */
|
||||||
|
|
||||||
#if ! ( defined(__CEGCC__) || defined(__MINGW32CE__) )
|
|
||||||
char *
|
char *
|
||||||
realpath(const char *file_name, char *resolved_name)
|
realpath(const char *file_name, char *resolved_name)
|
||||||
{
|
{
|
||||||
return _fullpath(resolved_name, file_name, PATH_MAX);
|
#if ! ( defined(__CEGCC__) || defined(__MINGW32CE__) )
|
||||||
|
return _fullpath(resolved_name, file_name, PATH_MAX);
|
||||||
|
#else
|
||||||
|
int length;
|
||||||
|
|
||||||
|
length = strlen(file_name);
|
||||||
|
if ((length + 1) > PATH_MAX)
|
||||||
|
length = PATH_MAX - 1;
|
||||||
|
memcpy(resolved_name, file_name, length);
|
||||||
|
resolved_name[length] = '\0';
|
||||||
|
|
||||||
|
return resolved_name;
|
||||||
|
#endif /* __CEGCC__ || __MINGW32CE__ */
|
||||||
}
|
}
|
||||||
#endif /* ! __CEGCC__ && ! __MINGW32CE__ */
|
|
||||||
|
|
||||||
int
|
int
|
||||||
evil_sockets_init(void)
|
evil_sockets_init(void)
|
||||||
|
|
Loading…
Reference in New Issue