return result;
}
-static Eina_Bool
-_check_same(const char *filename EINA_UNUSED, Eina_Strbuf *buf EINA_UNUSED)
-{
-#if 0
- /* because of our build system, this code will do no good yet; disable
- * for the time being */
- Eina_File *f = eina_file_open(filename, EINA_FALSE);
- size_t olen, nlen;
- const char *buf1, *buf2;
-
- if (!f)
- goto end;
-
- olen = eina_file_size_get(f);
- nlen = eina_strbuf_length_get(buf);
- if (olen != nlen)
- goto close_end;
-
- if (!(buf1 = eina_file_map_all(f, EINA_FILE_RANDOM)))
- goto close_end;
-
- if (!(buf2 = eina_strbuf_string_get(buf)))
- goto close_end;
-
- if (strncmp(buf1, buf2, nlen))
- goto close_end;
-
- eina_file_close(f);
- return EINA_TRUE;
-
-close_end:
- eina_file_close(f);
-end:
- return EINA_FALSE;
-#else
- return EINA_FALSE;
-#endif
-}
-
static Eina_Bool
_generate_eo_h_file(char *filename, const Eolian_Class *class)
{
hfile = _include_guard_enclose(_filename_get(filename), hfile);
- if (_check_same(filename, hfile))
- {
- ret = EINA_TRUE;
- goto end;
- }
-
FILE *fd = fopen(filename, "wb");
if (!fd)
{
goto end;
}
- if (_check_same(filename, hfile))
- {
- ret = EINA_TRUE;
- goto end;
- }
-
FILE *fd = fopen(filename, "wb");
if (!fd)
{
goto end;
}
- if (_check_same(filename, buffer))
- {
- ret = EINA_TRUE;
- goto end;
- }
-
fd = fopen(filename, "wb");
if (!fd)
{
lfile = _include_guard_enclose(_filename_get(filename), lfile);
- if (_check_same(filename, lfile))
- {
- ret = EINA_TRUE;
- goto end;
- }
-
- FILE*fd = fopen(filename, "wb");
+ FILE *fd = fopen(filename, "wb");
if (!fd)
{
const char *err = strerror(errno);