From eb3beca8d4a1c5073992d3f8a30d4e87e4f29430 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 24 Dec 2011 03:03:42 +0000 Subject: [PATCH] replace u_int64_t with cc99's uint64_t as suggested by Nicholas Bishop. --- intern/guardedalloc/MEM_sys_types.h | 8 ++++++++ source/blender/blenkernel/BKE_customdata.h | 2 +- source/blender/blenkernel/depsgraph_private.h | 2 +- source/blender/blenkernel/intern/object.c | 2 +- source/blender/blenloader/BLO_sys_types.h | 8 ++++++++ source/blender/editors/include/ED_view3d.h | 4 ++-- source/blender/makesdna/DNA_object_types.h | 4 ++-- source/blender/makesdna/DNA_scene_types.h | 4 ++-- source/blender/makesdna/intern/dna_genfile.c | 6 +++--- source/blender/makesdna/intern/makesdna.c | 2 +- source/blender/modifiers/intern/MOD_decimate.c | 4 ++-- source/blender/modifiers/intern/MOD_edgesplit.c | 2 +- source/blender/modifiers/intern/MOD_smooth.c | 5 ++--- source/blender/modifiers/intern/MOD_solidify.c | 4 ++-- source/blender/windowmanager/intern/wm_event_system.c | 2 +- 15 files changed, 37 insertions(+), 22 deletions(-) diff --git a/intern/guardedalloc/MEM_sys_types.h b/intern/guardedalloc/MEM_sys_types.h index 345df5b16cf..01ddddb73a0 100644 --- a/intern/guardedalloc/MEM_sys_types.h +++ b/intern/guardedalloc/MEM_sys_types.h @@ -93,6 +93,14 @@ typedef unsigned long uintptr_t; /* Linux-i386, Linux-Alpha, Linux-ppc */ #include +/* XXX */ +#ifndef uint64_t +typedef uint8_t u_int8_t; +typedef uint16_t u_int16_t; +typedef uint32_t u_int32_t; +typedef uint64_t u_int64_t; +#endif + #elif defined (__APPLE__) #include diff --git a/source/blender/blenkernel/BKE_customdata.h b/source/blender/blenkernel/BKE_customdata.h index fea706c45a5..c648cbb8493 100644 --- a/source/blender/blenkernel/BKE_customdata.h +++ b/source/blender/blenkernel/BKE_customdata.h @@ -41,7 +41,7 @@ extern "C" { struct ID; struct CustomData; struct CustomDataLayer; -typedef u_int64_t CustomDataMask; +typedef uint64_t CustomDataMask; extern const CustomDataMask CD_MASK_BAREMESH; extern const CustomDataMask CD_MASK_MESH; diff --git a/source/blender/blenkernel/depsgraph_private.h b/source/blender/blenkernel/depsgraph_private.h index 1c4d423131f..0338d10a66d 100644 --- a/source/blender/blenkernel/depsgraph_private.h +++ b/source/blender/blenkernel/depsgraph_private.h @@ -69,7 +69,7 @@ typedef struct DagNode int ancestor_count; unsigned int lay; // accumulated layers of its relations + itself unsigned int scelay; // layers due to being in scene - u_int64_t customdata_mask; // customdata mask + uint64_t customdata_mask; // customdata mask int lasttime; // if lasttime != DagForest->time, this node was not evaluated yet for flushing int BFS_dist; // BFS distance int DFS_dist; // DFS distance diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 76f11b7e87f..8251c4796ea 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -2563,7 +2563,7 @@ void object_handle_update(Scene *scene, Object *ob) #else /* ensure CD_MASK_BAREMESH for now */ EditMesh *em = (ob == scene->obedit)? BKE_mesh_get_editmesh(ob->data): NULL; - u_int64_t data_mask= scene->customdata_mask | ob->customdata_mask | CD_MASK_BAREMESH; + uint64_t data_mask= scene->customdata_mask | ob->customdata_mask | CD_MASK_BAREMESH; if(em) { makeDerivedMesh(scene, ob, em, data_mask); /* was CD_MASK_BAREMESH */ BKE_mesh_end_editmesh(ob->data, em); diff --git a/source/blender/blenloader/BLO_sys_types.h b/source/blender/blenloader/BLO_sys_types.h index e7f7a7e23bc..800ae834b59 100644 --- a/source/blender/blenloader/BLO_sys_types.h +++ b/source/blender/blenloader/BLO_sys_types.h @@ -86,6 +86,14 @@ typedef unsigned long uintptr_t; /* Linux-i386, Linux-Alpha, Linux-ppc */ #include +/* XXX */ +#ifndef uint64_t +typedef uint8_t u_int8_t; +typedef uint16_t u_int16_t; +typedef uint32_t u_int32_t; +typedef uint64_t u_int64_t; +#endif + #elif defined (__APPLE__) #include diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index fb41b2f7fb6..cf109768a43 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -286,8 +286,8 @@ Base *ED_view3d_give_base_under_cursor(struct bContext *C, const int mval[2]); void ED_view3d_quadview_update(struct ScrArea *sa, struct ARegion *ar, short do_clip); int ED_view3d_lock(struct RegionView3D *rv3d); -u_int64_t ED_view3d_datamask(struct Scene *scene, struct View3D *v3d); -u_int64_t ED_viewedit_datamask(struct bScreen *screen); +uint64_t ED_view3d_datamask(struct Scene *scene, struct View3D *v3d); +uint64_t ED_viewedit_datamask(struct bScreen *screen); /* camera lock functions */ int ED_view3d_camera_lock_check(struct View3D *v3d, struct RegionView3D *rv3d); diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index fcce21c936d..46b971e8e0d 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -250,8 +250,8 @@ typedef struct Object { struct FluidsimSettings *fluidsimSettings; /* if fluidsim enabled, store additional settings */ struct DerivedMesh *derivedDeform, *derivedFinal; - u_int64_t lastDataMask; /* the custom data layer mask that was last used to calculate derivedDeform and derivedFinal */ - u_int64_t customdata_mask; /* (extra) custom data layer mask to use for creating derivedmesh, set by depsgraph */ + uint64_t lastDataMask; /* the custom data layer mask that was last used to calculate derivedDeform and derivedFinal */ + uint64_t customdata_mask; /* (extra) custom data layer mask to use for creating derivedmesh, set by depsgraph */ unsigned int state; /* bit masks of game controllers that are active */ unsigned int init_state; /* bit masks of initial state as recorded by the users */ diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 1288e8a0cca..64b5bda3fc8 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -970,8 +970,8 @@ typedef struct Scene { /* Movie Tracking */ struct MovieClip *clip; /* active movie clip */ - u_int64_t customdata_mask; /* XXX. runtime flag for drawing, actually belongs in the window, only used by object_handle_update() */ - u_int64_t customdata_mask_modal; /* XXX. same as above but for temp operator use (gl renders) */ + uint64_t customdata_mask; /* XXX. runtime flag for drawing, actually belongs in the window, only used by object_handle_update() */ + uint64_t customdata_mask_modal; /* XXX. same as above but for temp operator use (gl renders) */ } Scene; diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c index d493083db8b..5b115a404ce 100644 --- a/source/blender/makesdna/intern/dna_genfile.c +++ b/source/blender/makesdna/intern/dna_genfile.c @@ -667,7 +667,7 @@ static eSDNA_Type sdna_type_nr(const char *dna_type) else if( strcmp(dna_type, "float")==0) return SDNA_TYPE_FLOAT; else if( strcmp(dna_type, "double")==0) return SDNA_TYPE_DOUBLE; else if( strcmp(dna_type, "int64_t")==0) return SDNA_TYPE_INT64; - else if( strcmp(dna_type, "u_int64_t")==0) return SDNA_TYPE_UINT64; + else if( strcmp(dna_type, "uint64_t")==0) return SDNA_TYPE_UINT64; else return -1; /* invalid! */ } @@ -713,7 +713,7 @@ static void cast_elem(const char *ctype, const char *otype, const char *name, ch case SDNA_TYPE_INT64: val= *( (int64_t *)olddata); break; case SDNA_TYPE_UINT64: - val= *( (u_int64_t *)olddata); break; + val= *( (uint64_t *)olddata); break; } switch(ctypenr) { @@ -740,7 +740,7 @@ static void cast_elem(const char *ctype, const char *otype, const char *name, ch case SDNA_TYPE_INT64: *( (int64_t *)curdata)= val; break; case SDNA_TYPE_UINT64: - *( (u_int64_t *)curdata)= val; break; + *( (uint64_t *)curdata)= val; break; } olddata+= oldlen; diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 31f52866367..2fa52776453 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -939,7 +939,7 @@ static int make_structDNA(char *baseDirectory, FILE *file) add_type("float", 4); /* SDNA_TYPE_FLOAT */ add_type("double", 8); /* SDNA_TYPE_DOUBLE */ add_type("int64_t", 8); /* SDNA_TYPE_INT64 */ - add_type("u_int64_t", 8); /* SDNA_TYPE_UINT64 */ + add_type("uint64_t", 8); /* SDNA_TYPE_UINT64 */ add_type("void", 0); /* SDNA_TYPE_VOID */ // the defines above shouldn't be output in the padding file... diff --git a/source/blender/modifiers/intern/MOD_decimate.c b/source/blender/modifiers/intern/MOD_decimate.c index aba68dc9edc..d1092345930 100644 --- a/source/blender/modifiers/intern/MOD_decimate.c +++ b/source/blender/modifiers/intern/MOD_decimate.c @@ -38,13 +38,13 @@ #include "BLI_math.h" #include "BLI_utildefines.h" +#include "MEM_guardedalloc.h" -#include "BKE_cdderivedmesh.h" #include "BKE_mesh.h" #include "BKE_modifier.h" #include "BKE_particle.h" +#include "BKE_cdderivedmesh.h" -#include "MEM_guardedalloc.h" #ifdef WITH_MOD_DECIMATE #include "LOD_decimation.h" diff --git a/source/blender/modifiers/intern/MOD_edgesplit.c b/source/blender/modifiers/intern/MOD_edgesplit.c index a4097d8967b..32ab2c82f90 100644 --- a/source/blender/modifiers/intern/MOD_edgesplit.c +++ b/source/blender/modifiers/intern/MOD_edgesplit.c @@ -47,12 +47,12 @@ #include "BLI_utildefines.h" #include "BLI_linklist.h" +#include "MEM_guardedalloc.h" #include "BKE_cdderivedmesh.h" #include "BKE_modifier.h" #include "BKE_particle.h" -#include "MEM_guardedalloc.h" #include "MOD_util.h" diff --git a/source/blender/modifiers/intern/MOD_smooth.c b/source/blender/modifiers/intern/MOD_smooth.c index 6edd8921c79..1bd5b2e78dd 100644 --- a/source/blender/modifiers/intern/MOD_smooth.c +++ b/source/blender/modifiers/intern/MOD_smooth.c @@ -39,13 +39,12 @@ #include "BLI_utildefines.h" #include "BLI_string.h" +#include "MEM_guardedalloc.h" + #include "BKE_cdderivedmesh.h" #include "BKE_particle.h" #include "BKE_deform.h" - -#include "MEM_guardedalloc.h" - #include "MOD_modifiertypes.h" #include "MOD_util.h" diff --git a/source/blender/modifiers/intern/MOD_solidify.c b/source/blender/modifiers/intern/MOD_solidify.c index 067d66fc82c..d11d10eb71b 100644 --- a/source/blender/modifiers/intern/MOD_solidify.c +++ b/source/blender/modifiers/intern/MOD_solidify.c @@ -40,16 +40,16 @@ #include "BLI_utildefines.h" #include "BLI_string.h" +#include "MEM_guardedalloc.h" + #include "BKE_cdderivedmesh.h" #include "BKE_mesh.h" #include "BKE_particle.h" #include "BKE_deform.h" - #include "MOD_modifiertypes.h" #include "MOD_util.h" -#include "MEM_guardedalloc.h" typedef struct EdgeFaceRef { int f1; /* init as -1 */ diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 064c98b7f8a..43a691770c9 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -186,7 +186,7 @@ void wm_event_do_notifiers(bContext *C) wmWindowManager *wm= CTX_wm_manager(C); wmNotifier *note, *next; wmWindow *win; - u_int64_t win_combine_v3d_datamask= 0; + uint64_t win_combine_v3d_datamask= 0; if(wm==NULL) return;