Skip to content

Instantly share code, notes, and snippets.

__attribute__((noinline)) int c_sum(int *data, int n)
{
int result = 0;
for(int i = 0; i < n; ++i){
result += data[i];
}
return result;
}
@ytomino
ytomino / c-alloca.ads
Last active November 4, 2020 23:52
x86_64-apple-darwin11
-- This file is translated by "headmaster" version 0.30-18d0286 (devel).
-- The original C header's license should be applied to this file.
-- All conditional-directives are expanded for the exclusive use of your
-- environment, it is not recommended to commit this file to any repository.
-------------------------------------------------------------------------------
with C.stddef;
package C.alloca is
pragma Preelaborate;
function alloca (a1 : stddef.size_t) return void_ptr;
pragma Import (C, alloca, "alloca");
@ytomino
ytomino / c-alloca.ads
Last active November 5, 2020 04:03
i686-apple-darwin10
-- This file is translated by "headmaster" version 0.30-611630a (devel).
-- The original C header's license should be applied to this file.
-- All conditional-directives are expanded for the exclusive use of your
-- environment, it is not recommended to commit this file to any repository.
-------------------------------------------------------------------------------
with C.stddef;
package C.alloca is
pragma Preelaborate;
function alloca (a1 : stddef.size_t) return void_ptr;
pragma Import (C, alloca, "alloca");
@ytomino
ytomino / c-alloca.ads
Last active November 4, 2020 23:51
x86_64-apple-darwin10
-- This file is translated by "headmaster" version 0.30-18d0286 (devel).
-- The original C header's license should be applied to this file.
-- All conditional-directives are expanded for the exclusive use of your
-- environment, it is not recommended to commit this file to any repository.
-------------------------------------------------------------------------------
with C.stddef;
package C.alloca is
pragma Preelaborate;
function alloca (a1 : stddef.size_t) return void_ptr;
pragma Import (C, alloca, "alloca");
@ytomino
ytomino / c-alloca.ads
Last active June 28, 2016 03:15
i686-apple-darwin9
-- This file is translated by "headmaster" version 0.27-2060155 (devel).
-- The original C header's license should be applied to this file.
-- All conditional-directives are expanded for the exclusive use of your
-- environment, it is not recommended to commit this file to any repository.
-------------------------------------------------------------------------------
with C.stddef;
package C.alloca is
pragma Preelaborate;
function alloca (a1 : stddef.size_t) return void_ptr;
pragma Import (C, alloca, "alloca");
@ytomino
ytomino / c-alloca.ads
Last active November 4, 2020 19:27
i686-pc-linux-gnu
-- This file is translated by "headmaster" version 0.30-886eb78 (devel).
-- The original C header's license should be applied to this file.
-- All conditional-directives are expanded for the exclusive use of your
-- environment, it is not recommended to commit this file to any repository.
-------------------------------------------------------------------------------
with C.stddef;
package C.alloca is
pragma Preelaborate;
function alloca (size : stddef.size_t) return void_ptr;
pragma Import (C, alloca, "alloca");
@ytomino
ytomino / c-alloca.ads
Last active November 4, 2020 19:26
x86_64-pc-linux-gnu
-- This file is translated by "headmaster" version 0.30-886eb78 (devel).
-- The original C header's license should be applied to this file.
-- All conditional-directives are expanded for the exclusive use of your
-- environment, it is not recommended to commit this file to any repository.
-------------------------------------------------------------------------------
with C.stddef;
package C.alloca is
pragma Preelaborate;
function alloca (size : stddef.size_t) return void_ptr;
pragma Import (C, alloca, "alloca");
@ytomino
ytomino / c-apisetcconv.ads
Last active June 11, 2016 10:03
i686-w64-mingw32
-- This file is translated by "headmaster" version 0.27-2060155 (devel).
-- The original C header's license should be applied to this file.
-- All conditional-directives are expanded for the exclusive use of your
-- environment, it is not recommended to commit this file to any repository.
-------------------------------------------------------------------------------
package C.apisetcconv is
pragma Preelaborate;
-- CMAPI (attribute)
-- CREDUIAPI (attribute)
-- WINABLEAPI (attribute)
@ytomino
ytomino / c-apisetcconv.ads
Last active June 11, 2016 10:03
x86_64-w64-mingw32
-- This file is translated by "headmaster" version 0.27-2060155 (devel).
-- The original C header's license should be applied to this file.
-- All conditional-directives are expanded for the exclusive use of your
-- environment, it is not recommended to commit this file to any repository.
-------------------------------------------------------------------------------
package C.apisetcconv is
pragma Preelaborate;
-- CMAPI (attribute)
-- CREDUIAPI (attribute)
-- WINABLEAPI (attribute)
@ytomino
ytomino / c-bsm-audit.ads
Last active November 4, 2020 20:39
i686-pc-freebsd9
-- This file is translated by "headmaster" version 0.30-18d0286 (devel).
-- The original C header's license should be applied to this file.
-- All conditional-directives are expanded for the exclusive use of your
-- environment, it is not recommended to commit this file to any repository.
-------------------------------------------------------------------------------
with C.sys.types;
package C.bsm.audit is
pragma Preelaborate;
subtype au_id_t is sys.types.uid_t;
subtype au_id_t_ptr is sys.types.uid_t_ptr;