Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
mongoose
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ganil-acq
GANILinux
linux-service
library
mongoose
Commits
06659844
Commit
06659844
authored
9 years ago
by
Deomid Ryabkov
Committed by
rojer
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Making Mongoose compile with TI compiler on CC3200
Part 1 PUBLISHED_FROM=a949d11b5cc578adf050f1b1d00375a2f91dfc0b
parent
57cf363b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mongoose.h
+44
-11
44 additions, 11 deletions
mongoose.h
with
44 additions
and
11 deletions
mongoose.h
+
44
−
11
View file @
06659844
...
@@ -385,7 +385,9 @@ unsigned long os_random(void);
...
@@ -385,7 +385,9 @@ unsigned long os_random(void);
#include
<assert.h>
#include
<assert.h>
#include
<ctype.h>
#include
<ctype.h>
#include
<errno.h>
#include
<errno.h>
#ifndef __TI_COMPILER_VERSION__
#include
<fcntl.h>
#include
<fcntl.h>
#endif
#include
<inttypes.h>
#include
<inttypes.h>
#include
<stdint.h>
#include
<stdint.h>
#include
<time.h>
#include
<time.h>
...
@@ -503,7 +505,6 @@ unsigned long os_random(void);
...
@@ -503,7 +505,6 @@ unsigned long os_random(void);
#define fd_set SlFdSet_t
#define fd_set SlFdSet_t
#define socket sl_Socket
#define socket sl_Socket
#define close sl_Close
#define accept sl_Accept
#define accept sl_Accept
#define bind sl_Bind
#define bind sl_Bind
#define listen sl_Listen
#define listen sl_Listen
...
@@ -534,7 +535,7 @@ typedef struct stat cs_stat_t;
...
@@ -534,7 +535,7 @@ typedef struct stat cs_stat_t;
#define INT64_X_FMT PRIx64
#define INT64_X_FMT PRIx64
#define __cdecl
#define __cdecl
#define closesocket(x)
c
lose(x)
#define closesocket(x)
sl_C
lose(x)
/* Some functions we implement for Mongoose. */
/* Some functions we implement for Mongoose. */
...
@@ -544,20 +545,52 @@ int inet_pton(int af, const char *src, void *dst);
...
@@ -544,20 +545,52 @@ int inet_pton(int af, const char *src, void *dst);
void
cc3200_set_non_blocking_mode
(
int
fd
);
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
;
struct
timeval
;
int
gettimeofday
(
struct
timeval
*
t
,
void
*
tz
);
int
gettimeofday
(
struct
timeval
*
t
,
void
*
tz
);
long
int
random
(
void
);
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
#ifdef CC3200_FS_SPIFFS
#include
<common/spiffs/spiffs.h>
#include
<common/spiffs/spiffs.h>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment