Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
06659844
Commit
06659844
authored
Mar 28, 2016
by
Deomid Ryabkov
Committed by
rojer
Apr 01, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Making Mongoose compile with TI compiler on CC3200
Part 1 PUBLISHED_FROM=a949d11b5cc578adf050f1b1d00375a2f91dfc0b
parent
57cf363b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
11 deletions
+44
-11
mongoose.h
mongoose.h
+44
-11
No files found.
mongoose.h
View file @
06659844
...
...
@@ -385,7 +385,9 @@ unsigned long os_random(void);
#include <assert.h>
#include <ctype.h>
#include <errno.h>
#ifndef __TI_COMPILER_VERSION__
#include <fcntl.h>
#endif
#include <inttypes.h>
#include <stdint.h>
#include <time.h>
...
...
@@ -503,7 +505,6 @@ unsigned long os_random(void);
#define fd_set SlFdSet_t
#define socket sl_Socket
#define close sl_Close
#define accept sl_Accept
#define bind sl_Bind
#define listen sl_Listen
...
...
@@ -534,7 +535,7 @@ typedef struct stat cs_stat_t;
#define INT64_X_FMT PRIx64
#define __cdecl
#define closesocket(x)
c
lose(x)
#define closesocket(x)
sl_C
lose(x)
/* Some functions we implement for Mongoose. */
...
...
@@ -544,20 +545,52 @@ int inet_pton(int af, const char *src, void *dst);
void
cc3200_set_non_blocking_mode
(
int
fd
);
struct
hostent
{
char
*
h_name
;
/* official name of host */
char
**
h_aliases
;
/* alias list */
int
h_addrtype
;
/* host address type */
int
h_length
;
/* length of address */
char
**
h_addr_list
;
/* list of addresses */
};
struct
hostent
*
gethostbyname
(
const
char
*
name
);
struct
timeval
;
int
gettimeofday
(
struct
timeval
*
t
,
void
*
tz
);
long
int
random
(
void
);
/* TI's libc does not have stat & friends, add them. */
#ifdef __TI_COMPILER_VERSION__
#include <file.h>
typedef
unsigned
int
mode_t
;
typedef
size_t
_off_t
;
typedef
long
ssize_t
;
struct
stat
{
int
st_ino
;
mode_t
st_mode
;
int
st_nlink
;
time_t
st_mtime
;
off_t
st_size
;
};
int
_stat
(
const
char
*
pathname
,
struct
stat
*
st
);
#define stat(a, b) _stat(a, b)
#define __S_IFMT 0170000
#define __S_IFDIR 0040000
#define __S_IFCHR 0020000
#define __S_IFREG 0100000
#define __S_ISTYPE(mode, mask) (((mode) & __S_IFMT) == (mask))
#define S_IFDIR __S_IFDIR
#define S_IFCHR __S_IFCHR
#define S_IFREG __S_IFREG
#define S_ISDIR(mode) __S_ISTYPE((mode), __S_IFDIR)
#define S_ISREG(mode) __S_ISTYPE((mode), __S_IFREG)
/* As of 5.2.7, TI compiler does not support va_copy() yet. */
#define va_copy(apc, ap) ((apc) = (ap))
#endif
/* __TI_COMPILER_VERSION__ */
#ifdef CC3200_FS_SPIFFS
#include <common/spiffs/spiffs.h>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment