Comments (1)
Ideally these would just import from libc
directly:
// b.c
use ::libc::printf;
#[no_mangle]
pub unsafe extern "C" fn funB(mut n: libc::c_int) -> libc::c_int {
printf(b"funB\0" as *const u8 as *const libc::c_char);
return n;
}
// a.rs
use ::libc::{printf, puts};
#[no_mangle]
pub unsafe extern "C" fn funA(mut n: libc::c_int) -> libc::c_int {
puts(b"funA\0" as *const u8 as *const libc::c_char);
printf(b"funA\0" as *const u8 as *const libc::c_char);
return n;
}
from c2rust.
Related Issues (20)
- Missing parentheses on reference applied to a cast
- Translate glsl
- analyze: proposal for simplified analysis and rewriting of allocations HOT 6
- Fails to compile on latest nightly HOT 3
- Git build failure on Ubuntu 24.04 HOT 4
- analyze: tracking issue for simple_buffer HOT 2
- analyze: Lifetimes are incorrectly added to public extern C functions HOT 2
- Failed to build c2rust from source code in docker HOT 1
- rust 1.80.0 build issue HOT 2
- Installing Behind Proxy Fails Due to Examples
- c2rust translated rust code gives different output from gcc and clang HOT 7
- PDG: Keep track of lifetimes of stack values
- analyze: Path- or context-sensitive analysis
- transpile panics on stdlib.h with invalid Ident HOT 1
- function macro definition not output HOT 2
- Add error messages instead of unwrap HOT 1
- Ast exporter segfault HOT 2
- Latest version on crates.io is 0.18.0 instead of 0.19.0 HOT 1
- `SrcLoc` sorting is non-transitive and a false total order and equality (panics in 1.81) HOT 11
- demonstration website experiencing downtime? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from c2rust.