Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LAB4
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexis Roche
LAB4
Commits
cd986479
Commit
cd986479
authored
2 years ago
by
Alexis Roche
Browse files
Options
Downloads
Patches
Plain Diff
autoconf
parent
b4fa8bce
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
build-system/buildAutoConf/a
+1
-1
1 addition, 1 deletion
build-system/buildAutoConf/a
build-system/buildAutoConf/copyfile.c
+20
-4
20 additions, 4 deletions
build-system/buildAutoConf/copyfile.c
build-system/buildAutoConf/libcopyfile.so
+0
-0
0 additions, 0 deletions
build-system/buildAutoConf/libcopyfile.so
with
21 additions
and
5 deletions
build-system/buildAutoConf/a
+
1
−
1
View file @
cd986479
coucou
\ No newline at end of file
Welcome to our seminar
\ No newline at end of file
This diff is collapsed.
Click to expand it.
build-system/buildAutoConf/copyfile.c
+
20
−
4
View file @
cd986479
#include
<stdio.h>
#include
<fcntl.h>
#include
<sys/ioctl.h>
#include
<linux/fs.h>
/* Definition of FICLONE* constants */
#include
<unistd.h>
#include
<sys/types.h>
#include
<sys/stat.h>
#include
<fcntl.h>
#include
<stdlib.h>
#define FICLONE HAVE_FICLONE
void
copy_files
()
{
printf
(
"pocos"
);
int
dest_fd
,
src_fd
;
src_fd
=
open
(
"a"
,
O_RDONLY
);
dest_fd
=
open
(
"b"
,
O_WRONLY
);
/* Needs to exist; not checking this */
dest_fd
=
open
(
"b"
,
O_WRONLY
);
#ifdef HAVE_FICLONE
printf
(
"Using FICLONE
\n
"
);
//ioctl doesnt work
if
(
ioctl
(
dest_fd
,
FICLONE
,
src_fd
)
<
0
)
{
printf
(
"error while copying the file"
);
printf
(
"error while copying the file
\n
"
);
//so we copy the file line by line
char
s
[
100
]
;
int
n
;
while
((
n
=
read
(
src_fd
,
s
,
sizeof
(
s
)))
>
0
){
write
(
dest_fd
,
s
,
n
);
}
return
;
}
#else
...
...
This diff is collapsed.
Click to expand it.
build-system/buildAutoConf/libcopyfile.so
+
0
−
0
View file @
cd986479
No preview for this file type
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