mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-22 16:28:32 +03:00
have local stdio.h file to avoid newlib issues
... we should move to -nostdinc at some point :/
This commit is contained in:
32
firmware/libcommon/include/stdio.h
Normal file
32
firmware/libcommon/include/stdio.h
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
#pragma once
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef EOF
|
||||||
|
#define EOF (-1)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
struct File;
|
||||||
|
typedef struct File FILE;
|
||||||
|
|
||||||
|
extern FILE* const stdin;
|
||||||
|
extern FILE* const stdout;
|
||||||
|
extern FILE* const stderr;
|
||||||
|
|
||||||
|
signed int vsnprintf(char *pStr, size_t length, const char *pFormat, va_list ap);
|
||||||
|
signed int snprintf(char *pString, size_t length, const char *pFormat, ...);
|
||||||
|
signed int vsprintf(char *pString, const char *pFormat, va_list ap);
|
||||||
|
signed int vfprintf(FILE *pStream, const char *pFormat, va_list ap);
|
||||||
|
signed int vprintf(const char *pFormat, va_list ap);
|
||||||
|
signed int fprintf(FILE *pStream, const char *pFormat, ...);
|
||||||
|
signed int printf(const char *pFormat, ...);
|
||||||
|
signed int sprintf(char *pStr, const char *pFormat, ...);
|
||||||
|
signed int puts(const char *pStr);
|
||||||
|
|
||||||
|
|
||||||
|
int fputc(int c, FILE *stream);
|
||||||
|
int fputs(const char *s, FILE *stream);
|
||||||
|
|
||||||
|
#define putc(c, stream) fputc(c, stream)
|
||||||
|
#define putchar(c) fputc(c, stdout)
|
||||||
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
//#define TRACE_LEVEL 6
|
//#define TRACE_LEVEL 6
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|||||||
@@ -59,10 +59,11 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// Global Variables
|
// Global Variables
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
FILE* const stdin = NULL;
|
||||||
|
FILE* const stdout = NULL;
|
||||||
|
FILE* const stderr = NULL;
|
||||||
|
|
||||||
// Required for proper compilation.
|
|
||||||
struct _reent r = {0, (FILE *) 0, (FILE *) 1, (FILE *) 0};
|
|
||||||
struct _reent *_impure_ptr = &r;
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// Local Functions
|
// Local Functions
|
||||||
|
|||||||
Reference in New Issue
Block a user